diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 6cf0e93679e3..c8aff69449ae 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -46,6 +46,7 @@ specifiers:
'@rush-temp/arm-operationalinsights': file:./projects/arm-operationalinsights.tgz
'@rush-temp/arm-operations': file:./projects/arm-operations.tgz
'@rush-temp/arm-orbital': file:./projects/arm-orbital.tgz
+ '@rush-temp/arm-peering': file:./projects/arm-peering.tgz
'@rush-temp/arm-policy': file:./projects/arm-policy.tgz
'@rush-temp/arm-portal': file:./projects/arm-portal.tgz
'@rush-temp/arm-postgresql': file:./projects/arm-postgresql.tgz
@@ -215,6 +216,7 @@ dependencies:
'@rush-temp/arm-operationalinsights': file:projects/arm-operationalinsights.tgz
'@rush-temp/arm-operations': file:projects/arm-operations.tgz
'@rush-temp/arm-orbital': file:projects/arm-orbital.tgz
+ '@rush-temp/arm-peering': file:projects/arm-peering.tgz
'@rush-temp/arm-policy': file:projects/arm-policy.tgz
'@rush-temp/arm-portal': file:projects/arm-portal.tgz
'@rush-temp/arm-postgresql': file:projects/arm-postgresql.tgz
@@ -8648,7 +8650,7 @@ packages:
dev: false
file:projects/app-configuration.tgz:
- resolution: {integrity: sha512-HBZl2EancfACeRLK2hWk+nCAgXrptXnS9hX5E5SLleYzlPHovsJRBWf3bv0NopaHCgFPdRcAw5xwKa1C2tPz2g==, tarball: file:projects/app-configuration.tgz}
+ resolution: {integrity: sha512-h9nLQwnEqw1OjRBrG2YmgFUD/wOCQe+fC+/45l/Kpeh2QBkLKXeJslgi5fme0YsUC0wmSsZqYaQZtn9mOCLjlw==, tarball: file:projects/app-configuration.tgz}
name: '@rush-temp/app-configuration'
version: 0.0.0
dependencies:
@@ -9122,7 +9124,7 @@ packages:
dev: false
file:projects/arm-eventhub.tgz:
- resolution: {integrity: sha512-u7elK+VQEh/PpmETDYomvdkwVxKVjIPOb6dELGwpNB2cuTV0/nkZUEKeWux+36A8Lhwo5Lyc/XAkKWWlLixwWw==, tarball: file:projects/arm-eventhub.tgz}
+ resolution: {integrity: sha512-cWryEMqcziFmqSkDI9ZMhEhjBmX3UEdauByCW1fFHAJ9XGHISFxr8jpJ1hKOj+c6mbp5JBD0UIU2MyceWk/OMg==, tarball: file:projects/arm-eventhub.tgz}
name: '@rush-temp/arm-eventhub'
version: 0.0.0
dependencies:
@@ -9479,6 +9481,27 @@ packages:
uglify-js: 3.14.3
dev: false
+ file:projects/arm-peering.tgz:
+ resolution: {integrity: sha512-R6EX40qwqD1WxKWTpApQ3EJah6iE4w1fZCbQcXMeivtGQ+cOFLsEC7jkodw9TerIupPnDvjLVlYOQXH3aWXBcQ==, tarball: file:projects/arm-peering.tgz}
+ name: '@rush-temp/arm-peering'
+ version: 0.0.0
+ dependencies:
+ '@microsoft/api-extractor': 7.18.19
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.3
+ dev: false
+
file:projects/arm-policy.tgz:
resolution: {integrity: sha512-YceZTHHZ9R04RdMSzFne+FJblJv2Mt7pMcQnvY9Z7GBCo7yLi/5jSmSZTYXB9u7Xx0P6nIG6wy+Ur9JXt3H4Kg==, tarball: file:projects/arm-policy.tgz}
name: '@rush-temp/arm-policy'
diff --git a/rush.json b/rush.json
index a7e20ebf1c9d..982c070919b4 100644
--- a/rush.json
+++ b/rush.json
@@ -1155,6 +1155,11 @@
"packageName": "@azure/arm-loadtestservice",
"projectFolder": "sdk/loadtestservice/arm-loadtestservice",
"versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-peering",
+ "projectFolder": "sdk/peering/arm-peering",
+ "versionPolicyName": "management"
}
]
}
\ No newline at end of file
diff --git a/sdk/peering/arm-peering/CHANGELOG.md b/sdk/peering/arm-peering/CHANGELOG.md
new file mode 100644
index 000000000000..941dec2bb3aa
--- /dev/null
+++ b/sdk/peering/arm-peering/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 2.0.0-beta.1 (2021-12-10)
+
+The package of @azure/arm-peering is using our next generation design principles since version 2.0.0-beta.1, which contains breaking changes.
+
+To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/peering/arm-peering/LICENSE.txt b/sdk/peering/arm-peering/LICENSE
similarity index 96%
rename from sdk/peering/arm-peering/LICENSE.txt
rename to sdk/peering/arm-peering/LICENSE
index b73b4a1293c3..ccb63b166732 100644
--- a/sdk/peering/arm-peering/LICENSE.txt
+++ b/sdk/peering/arm-peering/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2019 Microsoft
+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
@@ -18,4 +18,4 @@ 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.
+SOFTWARE.
\ No newline at end of file
diff --git a/sdk/peering/arm-peering/README.md b/sdk/peering/arm-peering/README.md
index c5aec46c2dcd..f3b63cfb0715 100644
--- a/sdk/peering/arm-peering/README.md
+++ b/sdk/peering/arm-peering/README.md
@@ -1,103 +1,98 @@
-## Azure PeeringManagementClient SDK for JavaScript
+# Azure PeeringManagement client library for JavaScript
-This package contains an isomorphic SDK for PeeringManagementClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure PeeringManagement client.
+
+Peering Client
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/peering/arm-peering) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-peering) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-peering) |
+[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
+
+## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
-- Latest versions of Safari, Chrome, Edge, and Firefox.
+- Latest versions of Safari, Chrome, Edge and Firefox.
+
+### Prerequisites
+
+- An [Azure subscription][azure_sub].
+
+### Install the `@azure/arm-peering` package
-### How to Install
+Install the Azure PeeringManagement client library for JavaScript with `npm`:
```bash
npm install @azure/arm-peering
```
-### How to use
+### Create and authenticate a `PeeringManagementClient`
-#### nodejs - Authentication, client creation and list legacyPeerings as an example written in TypeScript.
+To create a client object to access the Azure PeeringManagement API, you will need the `endpoint` of your Azure PeeringManagement resource and a `credential`. The Azure PeeringManagement client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your Azure PeeringManagement resource in the [Azure Portal][azure_portal].
-##### Install @azure/ms-rest-nodeauth
+You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
+
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
-- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
-npm install @azure/ms-rest-nodeauth@"^3.0.0"
+npm install @azure/identity
```
-##### Sample code
-
-```typescript
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
-import { PeeringManagementClient, PeeringManagementModels, PeeringManagementMappers } from "@azure/arm-peering";
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-msRestNodeAuth.interactiveLogin().then((creds) => {
- const client = new PeeringManagementClient(creds, subscriptionId);
- const peeringLocation = "testpeeringLocation";
- const kind = "Direct";
- client.legacyPeerings.list(peeringLocation, kind).then((result) => {
- console.log("The result is:");
- console.log(result);
- });
-}).catch((err) => {
- console.error(err);
-});
+You will also need to **register a new AAD application and grant access to Azure PeeringManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
+Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
+
+For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
+
+```javascript
+const { PeeringManagementClient } = require("@azure/arm-peering");
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new PeeringManagementClient(new DefaultAzureCredential(), subscriptionId);
```
-#### browser - Authentication, client creation and list legacyPeerings as an example written in JavaScript.
-##### Install @azure/ms-rest-browserauth
+### JavaScript Bundle
+To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
-```bash
-npm install @azure/ms-rest-browserauth
-```
+## Key concepts
-##### Sample code
-
-See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
-
-- index.html
-```html
-
-
-
- @azure/arm-peering sample
-
-
-
-
-
-
-
-
+### PeeringManagementClient
+
+`PeeringManagementClient` is the primary interface for developers using the Azure PeeringManagement client library. Explore the methods on this client object to understand the different features of the Azure PeeringManagement service that you can access.
+
+## Troubleshooting
+
+### Logging
+
+Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
+
+```javascript
+const { setLogLevel } = require("@azure/logger");
+setLogLevel("info");
```
+For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
+
+## Next steps
+
+Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
+
+## Contributing
+
+If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
+
## Related projects
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)

+
+[azure_cli]: https://docs.microsoft.com/cli/azure
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_portal]: https://portal.azure.com
+[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
+[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
diff --git a/sdk/peering/arm-peering/_meta.json b/sdk/peering/arm-peering/_meta.json
new file mode 100644
index 000000000000..40dc8e0dbc3e
--- /dev/null
+++ b/sdk/peering/arm-peering/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "52f9379c7709eb53f15b875b7de9b1abfa17f298",
+ "readme": "specification/peering/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/peering/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1"
+}
\ No newline at end of file
diff --git a/sdk/peering/arm-peering/api-extractor.json b/sdk/peering/arm-peering/api-extractor.json
new file mode 100644
index 000000000000..590552f6c518
--- /dev/null
+++ b/sdk/peering/arm-peering/api-extractor.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+ "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "docModel": { "enabled": true },
+ "apiReport": { "enabled": true, "reportFolder": "./review" },
+ "dtsRollup": {
+ "enabled": true,
+ "untrimmedFilePath": "",
+ "publicTrimmedFilePath": "./types/arm-peering.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/peering/arm-peering/package.json b/sdk/peering/arm-peering/package.json
index c7c2b7e47341..8c06965303c8 100644
--- a/sdk/peering/arm-peering/package.json
+++ b/sdk/peering/arm-peering/package.json
@@ -1,57 +1,89 @@
{
"name": "@azure/arm-peering",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "PeeringManagementClient Library with typescript type definitions for node.js and browser.",
- "version": "1.0.0",
+ "description": "A generated SDK for PeeringManagementClient.",
+ "version": "2.0.0-beta.1",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^2.0.1",
- "@azure/ms-rest-js": "^2.0.4",
- "tslib": "^1.10.0"
+ "@azure/core-paging": "^1.2.0",
+ "@azure/core-client": "^1.0.0",
+ "@azure/core-auth": "^1.3.0",
+ "@azure/core-rest-pipeline": "^1.1.0",
+ "tslib": "^2.2.0"
},
- "keywords": [
- "node",
- "azure",
- "typescript",
- "browser",
- "isomorphic"
- ],
+ "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
- "main": "./dist/arm-peering.js",
- "module": "./esm/peeringManagementClient.js",
- "types": "./esm/peeringManagementClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-peering.d.ts",
"devDependencies": {
- "typescript": "^3.5.3",
- "rollup": "^1.18.0",
- "rollup-plugin-node-resolve": "^5.2.0",
+ "@microsoft/api-extractor": "^7.18.11",
+ "@rollup/plugin-commonjs": "11.0.2",
+ "@rollup/plugin-json": "^4.0.0",
+ "@rollup/plugin-multi-entry": "^3.0.0",
+ "@rollup/plugin-node-resolve": "^8.0.0",
+ "mkdirp": "^1.0.4",
+ "rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
- "uglify-js": "^3.6.0"
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "rimraf": "^3.0.0",
+ "@azure/identity": "^2.0.1",
+ "@azure-tools/test-recorder": "^1.0.0",
+ "mocha": "^7.1.1",
+ "cross-env": "^7.0.2"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/peering/arm-peering",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
- "bugs": {
- "url": "https://github.com/Azure/azure-sdk-for-js/issues"
- },
+ "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",
+ "dist-esm/**/*.js",
+ "dist-esm/**/*.js.map",
+ "dist-esm/**/*.d.ts",
+ "dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"README.md",
+ "LICENSE",
"rollup.config.js",
- "tsconfig.json"
+ "tsconfig.json",
+ "review/*",
+ "CHANGELOG.md",
+ "types/*"
],
"scripts": {
- "build": "tsc && rollup -c rollup.config.js && npm run minify",
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-peering.js.map'\" -o ./dist/arm-peering.min.js ./dist/arm-peering.js",
- "prepack": "npm install && npm run build"
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
+ "prepack": "npm run build",
+ "pack": "npm pack 2>&1",
+ "extract-api": "api-extractor run --local",
+ "lint": "echo skipped",
+ "audit": "echo skipped",
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "build:node": "echo skipped",
+ "build:browser": "echo skipped",
+ "build:test": "echo skipped",
+ "build:samples": "echo skipped.",
+ "check-format": "echo skipped",
+ "execute:samples": "echo skipped",
+ "format": "echo skipped",
+ "test": "npm run integration-test",
+ "test:node": "echo skipped",
+ "test:browser": "echo skipped",
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
+ "unit-test:browser": "echo skipped",
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
diff --git a/sdk/peering/arm-peering/review/arm-peering.api.md b/sdk/peering/arm-peering/review/arm-peering.api.md
new file mode 100644
index 000000000000..60b18ddd8df1
--- /dev/null
+++ b/sdk/peering/arm-peering/review/arm-peering.api.md
@@ -0,0 +1,907 @@
+## API Report File for "@azure/arm-peering"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import * as coreAuth from '@azure/core-auth';
+import * as coreClient from '@azure/core-client';
+import { PagedAsyncIterableIterator } from '@azure/core-paging';
+
+// @public
+export interface BgpSession {
+ maxPrefixesAdvertisedV4?: number;
+ maxPrefixesAdvertisedV6?: number;
+ md5AuthenticationKey?: string;
+ readonly microsoftSessionIPv4Address?: string;
+ readonly microsoftSessionIPv6Address?: string;
+ peerSessionIPv4Address?: string;
+ peerSessionIPv6Address?: string;
+ sessionPrefixV4?: string;
+ sessionPrefixV6?: string;
+ readonly sessionStateV4?: SessionStateV4;
+ readonly sessionStateV6?: SessionStateV6;
+}
+
+// @public
+export interface CheckServiceProviderAvailabilityInput {
+ peeringServiceLocation?: string;
+ peeringServiceProvider?: string;
+}
+
+// @public
+export interface CheckServiceProviderAvailabilityOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CheckServiceProviderAvailabilityResponse = {
+ body: Enum0;
+};
+
+// @public
+export type ConnectionState = string;
+
+// @public
+export interface ContactInfo {
+ emails?: string[];
+ phone?: string[];
+}
+
+// @public
+export interface DirectConnection {
+ bandwidthInMbps?: number;
+ bgpSession?: BgpSession;
+ connectionIdentifier?: string;
+ readonly connectionState?: ConnectionState;
+ peeringDBFacilityId?: number;
+ provisionedBandwidthInMbps?: number;
+ sessionAddressProvider?: SessionAddressProvider;
+ useForPeeringService?: boolean;
+}
+
+// @public
+export interface DirectPeeringFacility {
+ address?: string;
+ directPeeringType?: DirectPeeringType;
+ peeringDBFacilityId?: number;
+ peeringDBFacilityLink?: string;
+}
+
+// @public
+export type DirectPeeringType = string;
+
+// @public
+export type Enum0 = string;
+
+// @public
+export type Enum1 = string;
+
+// @public
+export type Enum14 = string;
+
+// @public
+export type Enum15 = string;
+
+// @public
+export interface ErrorResponse {
+ readonly code?: string;
+ readonly message?: string;
+}
+
+// @public
+export interface ExchangeConnection {
+ bgpSession?: BgpSession;
+ connectionIdentifier?: string;
+ readonly connectionState?: ConnectionState;
+ peeringDBFacilityId?: number;
+}
+
+// @public
+export interface ExchangePeeringFacility {
+ bandwidthInMbps?: number;
+ exchangeName?: string;
+ facilityIPv4Prefix?: string;
+ facilityIPv6Prefix?: string;
+ microsoftIPv4Address?: string;
+ microsoftIPv6Address?: string;
+ peeringDBFacilityId?: number;
+ peeringDBFacilityLink?: string;
+}
+
+// @public
+export type Family = string;
+
+// @public
+export type Kind = string;
+
+// @public
+export enum KnownConnectionState {
+ // (undocumented)
+ Active = "Active",
+ // (undocumented)
+ Approved = "Approved",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ PendingApproval = "PendingApproval",
+ // (undocumented)
+ ProvisioningCompleted = "ProvisioningCompleted",
+ // (undocumented)
+ ProvisioningFailed = "ProvisioningFailed",
+ // (undocumented)
+ ProvisioningStarted = "ProvisioningStarted",
+ // (undocumented)
+ Validating = "Validating"
+}
+
+// @public
+export enum KnownDirectPeeringType {
+ // (undocumented)
+ Cdn = "Cdn",
+ // (undocumented)
+ Edge = "Edge",
+ // (undocumented)
+ Internal = "Internal",
+ // (undocumented)
+ Transit = "Transit"
+}
+
+// @public
+export enum KnownEnum0 {
+ // (undocumented)
+ Available = "Available",
+ // (undocumented)
+ UnAvailable = "UnAvailable"
+}
+
+// @public
+export enum KnownEnum1 {
+ // (undocumented)
+ Direct = "Direct",
+ // (undocumented)
+ Exchange = "Exchange"
+}
+
+// @public
+export enum KnownEnum14 {
+ // (undocumented)
+ Direct = "Direct",
+ // (undocumented)
+ Exchange = "Exchange"
+}
+
+// @public
+export enum KnownEnum15 {
+ // (undocumented)
+ Cdn = "Cdn",
+ // (undocumented)
+ Edge = "Edge",
+ // (undocumented)
+ Internal = "Internal",
+ // (undocumented)
+ Transit = "Transit"
+}
+
+// @public
+export enum KnownFamily {
+ // (undocumented)
+ Direct = "Direct",
+ // (undocumented)
+ Exchange = "Exchange"
+}
+
+// @public
+export enum KnownKind {
+ // (undocumented)
+ Direct = "Direct",
+ // (undocumented)
+ Exchange = "Exchange"
+}
+
+// @public
+export enum KnownLearnedType {
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ ViaPartner = "ViaPartner",
+ // (undocumented)
+ ViaSession = "ViaSession"
+}
+
+// @public
+export enum KnownName {
+ // (undocumented)
+ BasicDirectFree = "Basic_Direct_Free",
+ // (undocumented)
+ BasicExchangeFree = "Basic_Exchange_Free",
+ // (undocumented)
+ PremiumDirectFree = "Premium_Direct_Free",
+ // (undocumented)
+ PremiumDirectMetered = "Premium_Direct_Metered",
+ // (undocumented)
+ PremiumDirectUnlimited = "Premium_Direct_Unlimited",
+ // (undocumented)
+ PremiumExchangeMetered = "Premium_Exchange_Metered"
+}
+
+// @public
+export enum KnownPrefixValidationState {
+ // (undocumented)
+ Failed = "Failed",
+ // (undocumented)
+ Invalid = "Invalid",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ Pending = "Pending",
+ // (undocumented)
+ Unknown = "Unknown",
+ // (undocumented)
+ Verified = "Verified"
+}
+
+// @public
+export enum KnownProvisioningState {
+ // (undocumented)
+ Deleting = "Deleting",
+ // (undocumented)
+ Failed = "Failed",
+ // (undocumented)
+ Succeeded = "Succeeded",
+ // (undocumented)
+ Updating = "Updating"
+}
+
+// @public
+export enum KnownSessionAddressProvider {
+ // (undocumented)
+ Microsoft = "Microsoft",
+ // (undocumented)
+ Peer = "Peer"
+}
+
+// @public
+export enum KnownSessionStateV4 {
+ // (undocumented)
+ Active = "Active",
+ // (undocumented)
+ Connect = "Connect",
+ // (undocumented)
+ Established = "Established",
+ // (undocumented)
+ Idle = "Idle",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ OpenConfirm = "OpenConfirm",
+ // (undocumented)
+ OpenReceived = "OpenReceived",
+ // (undocumented)
+ OpenSent = "OpenSent",
+ // (undocumented)
+ PendingAdd = "PendingAdd",
+ // (undocumented)
+ PendingRemove = "PendingRemove",
+ // (undocumented)
+ PendingUpdate = "PendingUpdate"
+}
+
+// @public
+export enum KnownSessionStateV6 {
+ // (undocumented)
+ Active = "Active",
+ // (undocumented)
+ Connect = "Connect",
+ // (undocumented)
+ Established = "Established",
+ // (undocumented)
+ Idle = "Idle",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ OpenConfirm = "OpenConfirm",
+ // (undocumented)
+ OpenReceived = "OpenReceived",
+ // (undocumented)
+ OpenSent = "OpenSent",
+ // (undocumented)
+ PendingAdd = "PendingAdd",
+ // (undocumented)
+ PendingRemove = "PendingRemove",
+ // (undocumented)
+ PendingUpdate = "PendingUpdate"
+}
+
+// @public
+export enum KnownSize {
+ // (undocumented)
+ Free = "Free",
+ // (undocumented)
+ Metered = "Metered",
+ // (undocumented)
+ Unlimited = "Unlimited"
+}
+
+// @public
+export enum KnownTier {
+ // (undocumented)
+ Basic = "Basic",
+ // (undocumented)
+ Premium = "Premium"
+}
+
+// @public
+export enum KnownValidationState {
+ // (undocumented)
+ Approved = "Approved",
+ // (undocumented)
+ Failed = "Failed",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ Pending = "Pending"
+}
+
+// @public
+export type LearnedType = string;
+
+// @public
+export interface LegacyPeerings {
+ list(peeringLocation: string, kind: Enum1, options?: LegacyPeeringsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface LegacyPeeringsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LegacyPeeringsListNextResponse = PeeringListResult;
+
+// @public
+export interface LegacyPeeringsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LegacyPeeringsListResponse = PeeringListResult;
+
+// @public
+export type Name = string;
+
+// @public
+export interface Operation {
+ readonly display?: OperationDisplayInfo;
+ readonly isDataAction?: boolean;
+ readonly name?: string;
+}
+
+// @public
+export interface OperationDisplayInfo {
+ readonly description?: string;
+ readonly operation?: string;
+ readonly provider?: string;
+ readonly resource?: string;
+}
+
+// @public
+export interface OperationListResult {
+ nextLink?: string;
+ value?: Operation[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListNextResponse = OperationListResult;
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationListResult;
+
+// @public
+export type PeerAsn = Resource & {
+ peerAsn?: number;
+ peerContactInfo?: ContactInfo;
+ peerName?: string;
+ validationState?: ValidationState;
+};
+
+// @public
+export interface PeerAsnListResult {
+ nextLink?: string;
+ value?: PeerAsn[];
+}
+
+// @public
+export interface PeerAsns {
+ createOrUpdate(peerAsnName: string, peerAsn: PeerAsn, options?: PeerAsnsCreateOrUpdateOptionalParams): Promise;
+ delete(peerAsnName: string, options?: PeerAsnsDeleteOptionalParams): Promise;
+ get(peerAsnName: string, options?: PeerAsnsGetOptionalParams): Promise;
+ listBySubscription(options?: PeerAsnsListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PeerAsnsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeerAsnsCreateOrUpdateResponse = PeerAsn;
+
+// @public
+export interface PeerAsnsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface PeerAsnsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeerAsnsGetResponse = PeerAsn;
+
+// @public
+export interface PeerAsnsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeerAsnsListBySubscriptionNextResponse = PeerAsnListResult;
+
+// @public
+export interface PeerAsnsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeerAsnsListBySubscriptionResponse = PeerAsnListResult;
+
+// @public
+export type Peering = Resource & {
+ sku: PeeringSku;
+ kind: Kind;
+ location: string;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ direct?: PeeringPropertiesDirect;
+ exchange?: PeeringPropertiesExchange;
+ peeringLocation?: string;
+ readonly provisioningState?: ProvisioningState;
+};
+
+// @public
+export interface PeeringBandwidthOffer {
+ offerName?: string;
+ valueInMbps?: number;
+}
+
+// @public
+export interface PeeringListResult {
+ nextLink?: string;
+ value?: Peering[];
+}
+
+// @public
+export type PeeringLocation = Resource & {
+ kind?: Kind;
+ direct?: PeeringLocationPropertiesDirect;
+ exchange?: PeeringLocationPropertiesExchange;
+ peeringLocation?: string;
+ country?: string;
+ azureRegion?: string;
+};
+
+// @public
+export interface PeeringLocationListResult {
+ nextLink?: string;
+ value?: PeeringLocation[];
+}
+
+// @public
+export interface PeeringLocationPropertiesDirect {
+ bandwidthOffers?: PeeringBandwidthOffer[];
+ peeringFacilities?: DirectPeeringFacility[];
+}
+
+// @public
+export interface PeeringLocationPropertiesExchange {
+ peeringFacilities?: ExchangePeeringFacility[];
+}
+
+// @public
+export interface PeeringLocations {
+ list(kind: Enum14, options?: PeeringLocationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PeeringLocationsListNextOptionalParams extends coreClient.OperationOptions {
+ directPeeringType?: Enum15;
+}
+
+// @public
+export type PeeringLocationsListNextResponse = PeeringLocationListResult;
+
+// @public
+export interface PeeringLocationsListOptionalParams extends coreClient.OperationOptions {
+ directPeeringType?: Enum15;
+}
+
+// @public
+export type PeeringLocationsListResponse = PeeringLocationListResult;
+
+// @public (undocumented)
+export class PeeringManagementClient extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PeeringManagementClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ checkServiceProviderAvailability(checkServiceProviderAvailabilityInput: CheckServiceProviderAvailabilityInput, options?: CheckServiceProviderAvailabilityOptionalParams): Promise;
+ // (undocumented)
+ legacyPeerings: LegacyPeerings;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ peerAsns: PeerAsns;
+ // (undocumented)
+ peeringLocations: PeeringLocations;
+ // (undocumented)
+ peerings: Peerings;
+ // (undocumented)
+ peeringServiceLocations: PeeringServiceLocations;
+ // (undocumented)
+ peeringServicePrefixes: PeeringServicePrefixes;
+ // (undocumented)
+ peeringServiceProviders: PeeringServiceProviders;
+ // (undocumented)
+ peeringServices: PeeringServices;
+ // (undocumented)
+ prefixes: Prefixes;
+ // (undocumented)
+ subscriptionId: string;
+}
+
+// @public
+export interface PeeringManagementClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export interface PeeringPropertiesDirect {
+ connections?: DirectConnection[];
+ directPeeringType?: DirectPeeringType;
+ peerAsn?: SubResource;
+ useForPeeringService?: boolean;
+}
+
+// @public
+export interface PeeringPropertiesExchange {
+ connections?: ExchangeConnection[];
+ peerAsn?: SubResource;
+}
+
+// @public
+export interface Peerings {
+ createOrUpdate(resourceGroupName: string, peeringName: string, peering: Peering, options?: PeeringsCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroupName: string, peeringName: string, options?: PeeringsDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, peeringName: string, options?: PeeringsGetOptionalParams): Promise;
+ listByResourceGroup(resourceGroupName: string, options?: PeeringsListByResourceGroupOptionalParams): PagedAsyncIterableIterator;
+ listBySubscription(options?: PeeringsListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+ update(resourceGroupName: string, peeringName: string, tags: ResourceTags, options?: PeeringsUpdateOptionalParams): Promise;
+}
+
+// @public
+export interface PeeringsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsCreateOrUpdateResponse = Peering;
+
+// @public
+export interface PeeringsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringService = Resource & {
+ location: string;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ peeringServiceLocation?: string;
+ peeringServiceProvider?: string;
+ readonly provisioningState?: ProvisioningState;
+};
+
+// @public
+export interface PeeringServiceListResult {
+ nextLink?: string;
+ value?: PeeringService[];
+}
+
+// @public
+export type PeeringServiceLocation = Resource & {
+ country?: string;
+ state?: string;
+ azureRegion?: string;
+};
+
+// @public
+export interface PeeringServiceLocationListResult {
+ nextLink?: string;
+ value?: PeeringServiceLocation[];
+}
+
+// @public
+export interface PeeringServiceLocations {
+ list(options?: PeeringServiceLocationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PeeringServiceLocationsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServiceLocationsListNextResponse = PeeringServiceLocationListResult;
+
+// @public
+export interface PeeringServiceLocationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServiceLocationsListResponse = PeeringServiceLocationListResult;
+
+// @public
+export type PeeringServicePrefix = Resource & {
+ prefix?: string;
+ prefixValidationState?: PrefixValidationState;
+ learnedType?: LearnedType;
+ readonly provisioningState?: ProvisioningState;
+};
+
+// @public
+export interface PeeringServicePrefixes {
+ createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: PeeringServicePrefix, options?: PeeringServicePrefixesCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: PeeringServicePrefixesDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: PeeringServicePrefixesGetOptionalParams): Promise;
+}
+
+// @public
+export interface PeeringServicePrefixesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicePrefixesCreateOrUpdateResponse = PeeringServicePrefix;
+
+// @public
+export interface PeeringServicePrefixesDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface PeeringServicePrefixesGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicePrefixesGetResponse = PeeringServicePrefix;
+
+// @public
+export interface PeeringServicePrefixListResult {
+ nextLink?: string;
+ value?: PeeringServicePrefix[];
+}
+
+// @public
+export type PeeringServiceProvider = Resource & {
+ serviceProviderName?: string;
+};
+
+// @public
+export interface PeeringServiceProviderListResult {
+ nextLink?: string;
+ value?: PeeringServiceProvider[];
+}
+
+// @public
+export interface PeeringServiceProviders {
+ list(options?: PeeringServiceProvidersListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PeeringServiceProvidersListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServiceProvidersListNextResponse = PeeringServiceProviderListResult;
+
+// @public
+export interface PeeringServiceProvidersListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServiceProvidersListResponse = PeeringServiceProviderListResult;
+
+// @public
+export interface PeeringServices {
+ createOrUpdate(resourceGroupName: string, peeringServiceName: string, peeringService: PeeringService, options?: PeeringServicesCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroupName: string, peeringServiceName: string, options?: PeeringServicesDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, peeringServiceName: string, options?: PeeringServicesGetOptionalParams): Promise;
+ listByResourceGroup(resourceGroupName: string, options?: PeeringServicesListByResourceGroupOptionalParams): PagedAsyncIterableIterator;
+ listBySubscription(options?: PeeringServicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+ update(resourceGroupName: string, peeringServiceName: string, tags: ResourceTags, options?: PeeringServicesUpdateOptionalParams): Promise;
+}
+
+// @public
+export interface PeeringServicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesCreateOrUpdateResponse = PeeringService;
+
+// @public
+export interface PeeringServicesDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface PeeringServicesGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesGetResponse = PeeringService;
+
+// @public
+export interface PeeringServicesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesListByResourceGroupNextResponse = PeeringServiceListResult;
+
+// @public
+export interface PeeringServicesListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesListByResourceGroupResponse = PeeringServiceListResult;
+
+// @public
+export interface PeeringServicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesListBySubscriptionNextResponse = PeeringServiceListResult;
+
+// @public
+export interface PeeringServicesListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesListBySubscriptionResponse = PeeringServiceListResult;
+
+// @public
+export interface PeeringServicesUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringServicesUpdateResponse = PeeringService;
+
+// @public
+export interface PeeringsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsGetResponse = Peering;
+
+// @public
+export interface PeeringSku {
+ family?: Family;
+ name?: Name;
+ size?: Size;
+ tier?: Tier;
+}
+
+// @public
+export interface PeeringsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsListByResourceGroupNextResponse = PeeringListResult;
+
+// @public
+export interface PeeringsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsListByResourceGroupResponse = PeeringListResult;
+
+// @public
+export interface PeeringsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsListBySubscriptionNextResponse = PeeringListResult;
+
+// @public
+export interface PeeringsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsListBySubscriptionResponse = PeeringListResult;
+
+// @public
+export interface PeeringsUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PeeringsUpdateResponse = Peering;
+
+// @public
+export interface Prefixes {
+ listByPeeringService(resourceGroupName: string, peeringServiceName: string, options?: PrefixesListByPeeringServiceOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PrefixesListByPeeringServiceNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PrefixesListByPeeringServiceNextResponse = PeeringServicePrefixListResult;
+
+// @public
+export interface PrefixesListByPeeringServiceOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PrefixesListByPeeringServiceResponse = PeeringServicePrefixListResult;
+
+// @public
+export type PrefixValidationState = string;
+
+// @public
+export type ProvisioningState = string;
+
+// @public
+export interface Resource {
+ readonly id?: string;
+ readonly name?: string;
+ readonly type?: string;
+}
+
+// @public
+export interface ResourceTags {
+ tags?: {
+ [propertyName: string]: string;
+ };
+}
+
+// @public
+export type SessionAddressProvider = string;
+
+// @public
+export type SessionStateV4 = string;
+
+// @public
+export type SessionStateV6 = string;
+
+// @public
+export type Size = string;
+
+// @public
+export interface SubResource {
+ id?: string;
+}
+
+// @public
+export type Tier = string;
+
+// @public
+export type ValidationState = string;
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/peering/arm-peering/rollup.config.js b/sdk/peering/arm-peering/rollup.config.js
index 6115b0630086..9be1955eb7f1 100644
--- a/sdk/peering/arm-peering/rollup.config.js
+++ b/sdk/peering/arm-peering/rollup.config.js
@@ -1,37 +1,188 @@
-import rollup from "rollup";
-import nodeResolve from "rollup-plugin-node-resolve";
+/*
+ * 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 nodeResolve from "@rollup/plugin-node-resolve";
+import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
+import multiEntry from "@rollup/plugin-multi-entry";
+import json from "@rollup/plugin-json";
+
+import nodeBuiltins from "builtin-modules";
+
+/**
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
+ *
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
+ * __exportStar downleveled helper function to declare its exports which confuses
+ * rollup's automatic discovery mechanism.
+ *
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
+ */
+export function openTelemetryCommonJs() {
+ const namedExports = {};
+
+ for (const key of [
+ "@opentelemetry/api",
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
+ ]) {
+ namedExports[key] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "SpanStatusCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
+
+ for (const version of releasedOpenTelemetryVersions) {
+ namedExports[
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
+ ] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "StatusCode",
+ "CanonicalCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ return namedExports;
+}
+
+// #region Warning Handler
/**
- * @type {rollup.RollupFileOptions}
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
*/
-const config = {
- input: "./esm/peeringManagementClient.js",
- external: [
- "@azure/ms-rest-js",
- "@azure/ms-rest-azure-js"
- ],
- output: {
- file: "./dist/arm-peering.js",
- format: "umd",
- name: "Azure.ArmPeering",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
+
+function ignoreNiseSinonEvalWarnings(warning) {
+ return (
+ warning.code === "EVAL" &&
+ warning.id &&
+ (warning.id.includes("node_modules/nise") ||
+ warning.id.includes("node_modules/sinon")) === true
+ );
+}
+
+function ignoreChaiCircularDependencyWarnings(warning) {
+ return (
+ warning.code === "CIRCULAR_DEPENDENCY" &&
+ warning.importer && warning.importer.includes("node_modules/chai") === true
+ );
+}
+
+const warningInhibitors = [
+ ignoreChaiCircularDependencyWarnings,
+ ignoreNiseSinonEvalWarnings
+];
+
+/**
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
+ */
+function makeOnWarnForTesting() {
+ return (warning, warn) => {
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
+ warn(warning);
+ }
+ };
+}
+
+// #endregion
+
+function makeBrowserTestConfig() {
+ const config = {
+ input: {
+ include: ["dist-esm/test/**/*.spec.js"],
+ exclude: ["dist-esm/test/**/node/**"]
},
- banner: `/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */`
- },
- plugins: [
- nodeResolve({ mainFields: ['module', 'main'] }),
- sourcemaps()
- ]
+ output: {
+ file: `dist-test/index.browser.js`,
+ format: "umd",
+ sourcemap: true
+ },
+ preserveSymlinks: false,
+ plugins: [
+ multiEntry({ exports: false }),
+ nodeResolve({
+ mainFields: ["module", "browser"]
+ }),
+ cjs({
+ namedExports: {
+ // Chai's strange internal architecture makes it impossible to statically
+ // analyze its exports.
+ chai: [
+ "version",
+ "use",
+ "util",
+ "config",
+ "expect",
+ "should",
+ "assert"
+ ],
+ ...openTelemetryCommonJs()
+ }
+ }),
+ json(),
+ sourcemaps()
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
+ ],
+ onwarn: makeOnWarnForTesting(),
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
+ // rollup started respecting the "sideEffects" field in package.json. Since
+ // our package.json sets "sideEffects=false", this also applies to test
+ // code, which causes all tests to be removed by tree-shaking.
+ treeshake: false
+ };
+
+ return config;
+}
+
+const defaultConfigurationOptions = {
+ disableBrowserBundle: false
};
-export default config;
+export function makeConfig(pkg, options) {
+ options = {
+ ...defaultConfigurationOptions,
+ ...(options || {})
+ };
+
+ const baseConfig = {
+ // Use the package's module field if it has one
+ input: pkg["module"] || "dist-esm/src/index.js",
+ external: [
+ ...nodeBuiltins,
+ ...Object.keys(pkg.dependencies),
+ ...Object.keys(pkg.devDependencies)
+ ],
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
+ preserveSymlinks: false,
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
+ };
+
+ const config = [baseConfig];
+
+ if (!options.disableBrowserBundle) {
+ config.push(makeBrowserTestConfig());
+ }
+
+ return config;
+}
+
+export default makeConfig(require("./package.json"));
diff --git a/sdk/peering/arm-peering/src/index.ts b/sdk/peering/arm-peering/src/index.ts
new file mode 100644
index 000000000000..56cfeda47b0f
--- /dev/null
+++ b/sdk/peering/arm-peering/src/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+///
+export * from "./models";
+export { PeeringManagementClient } from "./peeringManagementClient";
+export * from "./operationsInterfaces";
diff --git a/sdk/peering/arm-peering/src/models/index.ts b/sdk/peering/arm-peering/src/models/index.ts
index fd1be10962e1..d5dc01bf5adf 100644
--- a/sdk/peering/arm-peering/src/models/index.ts
+++ b/sdk/peering/arm-peering/src/models/index.ts
@@ -1,1561 +1,1077 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * 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";
+import * as coreClient from "@azure/core-client";
-export { BaseResource, CloudError };
-
-/**
- * Class for CheckServiceProviderAvailabilityInput
- */
+/** Class for CheckServiceProviderAvailabilityInput */
export interface CheckServiceProviderAvailabilityInput {
- /**
- * Gets or sets the PeeringServiceLocation
- */
+ /** Gets or sets the PeeringServiceLocation */
peeringServiceLocation?: string;
- /**
- * Gets or sets the PeeringServiceProvider
- */
+ /** Gets or sets the PeeringServiceProvider */
peeringServiceProvider?: string;
}
-/**
- * The SKU that defines the tier and kind of the peering.
- */
-export interface PeeringSku {
+/** The error response that indicates why an operation has failed. */
+export interface ErrorResponse {
/**
- * The name of the peering SKU. Possible values include: 'Basic_Exchange_Free',
- * 'Basic_Direct_Free', 'Premium_Direct_Free', 'Premium_Exchange_Metered',
- * 'Premium_Direct_Metered', 'Premium_Direct_Unlimited'
+ * The error code.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- name?: Name;
+ readonly code?: string;
/**
- * The tier of the peering SKU. Possible values include: 'Basic', 'Premium'
+ * The error message.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly message?: string;
+}
+
+/** The paginated list of peerings. */
+export interface PeeringListResult {
+ /** The list of peerings. */
+ value?: Peering[];
+ /** The link to fetch the next page of peerings. */
+ nextLink?: string;
+}
+
+/** The SKU that defines the tier and kind of the peering. */
+export interface PeeringSku {
+ /** The name of the peering SKU. */
+ name?: Name;
+ /** The tier of the peering SKU. */
tier?: Tier;
- /**
- * The family of the peering SKU. Possible values include: 'Direct', 'Exchange'
- */
+ /** The family of the peering SKU. */
family?: Family;
- /**
- * The size of the peering SKU. Possible values include: 'Free', 'Metered', 'Unlimited'
- */
+ /** The size of the peering SKU. */
size?: Size;
}
-/**
- * The properties that define a BGP session.
- */
-export interface BgpSession {
+/** The properties that define a direct peering. */
+export interface PeeringPropertiesDirect {
+ /** The set of connections that constitute a direct peering. */
+ connections?: DirectConnection[];
+ /** The flag that indicates whether or not the peering is used for peering service. */
+ useForPeeringService?: boolean;
+ /** The reference of the peer ASN. */
+ peerAsn?: SubResource;
+ /** The type of direct peering. */
+ directPeeringType?: DirectPeeringType;
+}
+
+/** The properties that define a direct connection. */
+export interface DirectConnection {
+ /** The bandwidth of the connection. */
+ bandwidthInMbps?: number;
+ /** The bandwidth that is actually provisioned. */
+ provisionedBandwidthInMbps?: number;
+ /** The field indicating if Microsoft provides session ip addresses. */
+ sessionAddressProvider?: SessionAddressProvider;
+ /** The flag that indicates whether or not the connection is used for peering service. */
+ useForPeeringService?: boolean;
+ /** The PeeringDB.com ID of the facility at which the connection has to be set up. */
+ peeringDBFacilityId?: number;
/**
- * The IPv4 prefix that contains both ends' IPv4 addresses.
+ * The state of the connection.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly connectionState?: ConnectionState;
+ /** The BGP session associated with the connection. */
+ bgpSession?: BgpSession;
+ /** The unique identifier (GUID) for the connection. */
+ connectionIdentifier?: string;
+}
+
+/** The properties that define a BGP session. */
+export interface BgpSession {
+ /** The IPv4 prefix that contains both ends' IPv4 addresses. */
sessionPrefixV4?: string;
- /**
- * The IPv6 prefix that contains both ends' IPv6 addresses.
- */
+ /** The IPv6 prefix that contains both ends' IPv6 addresses. */
sessionPrefixV6?: string;
/**
* The IPv4 session address on Microsoft's end.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly microsoftSessionIPv4Address?: string;
/**
* The IPv6 session address on Microsoft's end.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly microsoftSessionIPv6Address?: string;
- /**
- * The IPv4 session address on peer's end.
- */
+ /** The IPv4 session address on peer's end. */
peerSessionIPv4Address?: string;
- /**
- * The IPv6 session address on peer's end.
- */
+ /** The IPv6 session address on peer's end. */
peerSessionIPv6Address?: string;
/**
- * The state of the IPv4 session. Possible values include: 'None', 'Idle', 'Connect', 'Active',
- * 'OpenSent', 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate',
- * 'PendingRemove'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The state of the IPv4 session.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly sessionStateV4?: SessionStateV4;
/**
- * The state of the IPv6 session. Possible values include: 'None', 'Idle', 'Connect', 'Active',
- * 'OpenSent', 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate',
- * 'PendingRemove'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The state of the IPv6 session.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly sessionStateV6?: SessionStateV6;
- /**
- * The maximum number of prefixes advertised over the IPv4 session.
- */
+ /** The maximum number of prefixes advertised over the IPv4 session. */
maxPrefixesAdvertisedV4?: number;
- /**
- * The maximum number of prefixes advertised over the IPv6 session.
- */
+ /** The maximum number of prefixes advertised over the IPv6 session. */
maxPrefixesAdvertisedV6?: number;
- /**
- * The MD5 authentication key of the session.
- */
+ /** The MD5 authentication key of the session. */
md5AuthenticationKey?: string;
}
-/**
- * The properties that define a direct connection.
- */
-export interface DirectConnection {
- /**
- * The bandwidth of the connection.
- */
- bandwidthInMbps?: number;
- /**
- * The bandwidth that is actually provisioned.
- */
- provisionedBandwidthInMbps?: number;
- /**
- * The field indicating if Microsoft provides session ip addresses. Possible values include:
- * 'Microsoft', 'Peer'
- */
- sessionAddressProvider?: SessionAddressProvider;
- /**
- * The flag that indicates whether or not the connection is used for peering service.
- */
- useForPeeringService?: boolean;
- /**
- * The PeeringDB.com ID of the facility at which the connection has to be set up.
- */
- peeringDBFacilityId?: number;
- /**
- * The state of the connection. Possible values include: 'None', 'PendingApproval', 'Approved',
- * 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly connectionState?: ConnectionState;
- /**
- * The BGP session associated with the connection.
- */
- bgpSession?: BgpSession;
- /**
- * The unique identifier (GUID) for the connection.
- */
- connectionIdentifier?: string;
-}
-
-/**
- * The sub resource.
- */
+/** The sub resource. */
export interface SubResource {
- /**
- * The identifier of the referenced resource.
- */
+ /** The identifier of the referenced resource. */
id?: string;
}
-/**
- * The properties that define a direct peering.
- */
-export interface PeeringPropertiesDirect {
- /**
- * The set of connections that constitute a direct peering.
- */
- connections?: DirectConnection[];
- /**
- * The flag that indicates whether or not the peering is used for peering service.
- */
- useForPeeringService?: boolean;
- /**
- * The reference of the peer ASN.
- */
+/** The properties that define an exchange peering. */
+export interface PeeringPropertiesExchange {
+ /** The set of connections that constitute an exchange peering. */
+ connections?: ExchangeConnection[];
+ /** The reference of the peer ASN. */
peerAsn?: SubResource;
- /**
- * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'
- */
- directPeeringType?: DirectPeeringType;
}
-/**
- * The properties that define an exchange connection.
- */
+/** The properties that define an exchange connection. */
export interface ExchangeConnection {
- /**
- * The PeeringDB.com ID of the facility at which the connection has to be set up.
- */
+ /** The PeeringDB.com ID of the facility at which the connection has to be set up. */
peeringDBFacilityId?: number;
/**
- * The state of the connection. Possible values include: 'None', 'PendingApproval', 'Approved',
- * 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The state of the connection.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly connectionState?: ConnectionState;
- /**
- * The BGP session associated with the connection.
- */
+ /** The BGP session associated with the connection. */
bgpSession?: BgpSession;
- /**
- * The unique identifier (GUID) for the connection.
- */
+ /** The unique identifier (GUID) for the connection. */
connectionIdentifier?: string;
}
-/**
- * The properties that define an exchange peering.
- */
-export interface PeeringPropertiesExchange {
- /**
- * The set of connections that constitute an exchange peering.
- */
- connections?: ExchangeConnection[];
- /**
- * The reference of the peer ASN.
- */
- peerAsn?: SubResource;
-}
-
-/**
- * The ARM resource class.
- */
-export interface Resource extends BaseResource {
+/** The ARM resource class. */
+export interface Resource {
/**
* The name of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* The ID of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The type of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
}
-/**
- * Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a
- * location.
- */
-export interface Peering extends Resource {
- /**
- * The SKU that defines the tier and kind of the peering.
- */
- sku: PeeringSku;
- /**
- * The kind of the peering. Possible values include: 'Direct', 'Exchange'
- */
- kind: Kind;
- /**
- * The properties that define a direct peering.
- */
- direct?: PeeringPropertiesDirect;
- /**
- * The properties that define an exchange peering.
- */
- exchange?: PeeringPropertiesExchange;
- /**
- * The location of the peering.
- */
- peeringLocation?: string;
+/** The paginated list of peering API operations. */
+export interface OperationListResult {
+ /** The list of peering API operations. */
+ value?: Operation[];
+ /** The link to fetch the next page of peering API operations. */
+ nextLink?: string;
+}
+
+/** The peering API operation. */
+export interface Operation {
/**
- * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating',
- * 'Deleting', 'Failed'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The name of the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly provisioningState?: ProvisioningState;
+ readonly name?: string;
/**
- * The location of the resource.
+ * The information related to the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- location: string;
+ readonly display?: OperationDisplayInfo;
/**
- * The resource tags.
+ * The flag that indicates whether the operation applies to data plane.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- tags?: { [propertyName: string]: string };
+ readonly isDataAction?: boolean;
}
-/**
- * The information related to the operation.
- */
+/** The information related to the operation. */
export interface OperationDisplayInfo {
/**
* The name of the resource provider.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provider?: string;
/**
* The type of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resource?: string;
/**
* The name of the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly operation?: string;
/**
* The description of the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly description?: string;
}
-/**
- * The peering API operation.
- */
-export interface Operation {
- /**
- * The name of the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly name?: string;
- /**
- * The information related to the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly display?: OperationDisplayInfo;
- /**
- * The flag that indicates whether the operation applies to data plane.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly isDataAction?: boolean;
-}
-
-/**
- * The contact information of the peer.
- */
+/** The contact information of the peer. */
export interface ContactInfo {
- /**
- * The list of email addresses.
- */
+ /** The list of email addresses. */
emails?: string[];
- /**
- * The list of contact numbers.
- */
+ /** The list of contact numbers. */
phone?: string[];
}
-/**
- * The essential information related to the peer's ASN.
- */
-export interface PeerAsn extends Resource {
- /**
- * The Autonomous System Number (ASN) of the peer.
- */
- peerAsn?: number;
- /**
- * The contact information of the peer.
- */
- peerContactInfo?: ContactInfo;
- /**
- * The name of the peer.
- */
- peerName?: string;
- /**
- * The validation state of the ASN associated with the peer. Possible values include: 'None',
- * 'Pending', 'Approved', 'Failed'
- */
- validationState?: ValidationState;
+/** The paginated list of peer ASNs. */
+export interface PeerAsnListResult {
+ /** The list of peer ASNs. */
+ value?: PeerAsn[];
+ /** The link to fetch the next page of peer ASNs. */
+ nextLink?: string;
}
-/**
- * The properties that define a direct peering facility.
- */
+/** The paginated list of peering locations. */
+export interface PeeringLocationListResult {
+ /** The list of peering locations. */
+ value?: PeeringLocation[];
+ /** The link to fetch the next page of peering locations. */
+ nextLink?: string;
+}
+
+/** The properties that define a direct peering location. */
+export interface PeeringLocationPropertiesDirect {
+ /** The list of direct peering facilities at the peering location. */
+ peeringFacilities?: DirectPeeringFacility[];
+ /** The list of bandwidth offers available at the peering location. */
+ bandwidthOffers?: PeeringBandwidthOffer[];
+}
+
+/** The properties that define a direct peering facility. */
export interface DirectPeeringFacility {
- /**
- * The address of the direct peering facility.
- */
+ /** The address of the direct peering facility. */
address?: string;
- /**
- * The type of the direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'
- */
+ /** The type of the direct peering. */
directPeeringType?: DirectPeeringType;
- /**
- * The PeeringDB.com ID of the facility.
- */
+ /** The PeeringDB.com ID of the facility. */
peeringDBFacilityId?: number;
- /**
- * The PeeringDB.com URL of the facility.
- */
+ /** The PeeringDB.com URL of the facility. */
peeringDBFacilityLink?: string;
}
-/**
- * The properties that define a peering bandwidth offer.
- */
+/** The properties that define a peering bandwidth offer. */
export interface PeeringBandwidthOffer {
- /**
- * The name of the bandwidth offer.
- */
+ /** The name of the bandwidth offer. */
offerName?: string;
- /**
- * The value of the bandwidth offer in Mbps.
- */
+ /** The value of the bandwidth offer in Mbps. */
valueInMbps?: number;
}
-/**
- * The properties that define a direct peering location.
- */
-export interface PeeringLocationPropertiesDirect {
- /**
- * The list of direct peering facilities at the peering location.
- */
- peeringFacilities?: DirectPeeringFacility[];
- /**
- * The list of bandwidth offers available at the peering location.
- */
- bandwidthOffers?: PeeringBandwidthOffer[];
+/** The properties that define an exchange peering location. */
+export interface PeeringLocationPropertiesExchange {
+ /** The list of exchange peering facilities at the peering location. */
+ peeringFacilities?: ExchangePeeringFacility[];
}
-/**
- * The properties that define an exchange peering facility.
- */
+/** The properties that define an exchange peering facility. */
export interface ExchangePeeringFacility {
- /**
- * The name of the exchange peering facility.
- */
+ /** The name of the exchange peering facility. */
exchangeName?: string;
- /**
- * The bandwidth of the connection between Microsoft and the exchange peering facility.
- */
+ /** The bandwidth of the connection between Microsoft and the exchange peering facility. */
bandwidthInMbps?: number;
- /**
- * The IPv4 address of Microsoft at the exchange peering facility.
- */
+ /** The IPv4 address of Microsoft at the exchange peering facility. */
microsoftIPv4Address?: string;
- /**
- * The IPv6 address of Microsoft at the exchange peering facility.
- */
+ /** The IPv6 address of Microsoft at the exchange peering facility. */
microsoftIPv6Address?: string;
- /**
- * The IPv4 prefixes associated with the exchange peering facility.
- */
+ /** The IPv4 prefixes associated with the exchange peering facility. */
facilityIPv4Prefix?: string;
- /**
- * The IPv6 prefixes associated with the exchange peering facility.
- */
+ /** The IPv6 prefixes associated with the exchange peering facility. */
facilityIPv6Prefix?: string;
- /**
- * The PeeringDB.com ID of the facility.
- */
+ /** The PeeringDB.com ID of the facility. */
peeringDBFacilityId?: number;
- /**
- * The PeeringDB.com URL of the facility.
- */
+ /** The PeeringDB.com URL of the facility. */
peeringDBFacilityLink?: string;
}
-/**
- * The properties that define an exchange peering location.
- */
-export interface PeeringLocationPropertiesExchange {
- /**
- * The list of exchange peering facilities at the peering location.
- */
- peeringFacilities?: ExchangePeeringFacility[];
+/** The resource tags. */
+export interface ResourceTags {
+ /** Gets or sets the tags, a dictionary of descriptors arm object */
+ tags?: { [propertyName: string]: string };
}
-/**
- * Peering location is where connectivity could be established to the Microsoft Cloud Edge.
- */
-export interface PeeringLocation extends Resource {
+/** The paginated list of peering service locations. */
+export interface PeeringServiceLocationListResult {
+ /** The list of peering service locations. */
+ value?: PeeringServiceLocation[];
+ /** The link to fetch the next page of peering service locations. */
+ nextLink?: string;
+}
+
+/** The paginated list of [T]. */
+export interface PeeringServicePrefixListResult {
+ /** The list of [T]. */
+ value?: PeeringServicePrefix[];
+ /** The link to fetch the next page of [T]. */
+ nextLink?: string;
+}
+
+/** The paginated list of peering service providers. */
+export interface PeeringServiceProviderListResult {
+ /** The list of peering service providers. */
+ value?: PeeringServiceProvider[];
+ /** The link to fetch the next page of peering service providers. */
+ nextLink?: string;
+}
+
+/** The paginated list of peering services. */
+export interface PeeringServiceListResult {
+ /** The list of peering services. */
+ value?: PeeringService[];
+ /** The link to fetch the next page of peering services. */
+ nextLink?: string;
+}
+
+/** Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location. */
+export type Peering = Resource & {
+ /** The SKU that defines the tier and kind of the peering. */
+ sku: PeeringSku;
+ /** The kind of the peering. */
+ kind: Kind;
+ /** The location of the resource. */
+ location: string;
+ /** The resource tags. */
+ tags?: { [propertyName: string]: string };
+ /** The properties that define a direct peering. */
+ direct?: PeeringPropertiesDirect;
+ /** The properties that define an exchange peering. */
+ exchange?: PeeringPropertiesExchange;
+ /** The location of the peering. */
+ peeringLocation?: string;
/**
- * The kind of peering that the peering location supports. Possible values include: 'Direct',
- * 'Exchange'
+ * The provisioning state of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly provisioningState?: ProvisioningState;
+};
+
+/** The essential information related to the peer's ASN. */
+export type PeerAsn = Resource & {
+ /** The Autonomous System Number (ASN) of the peer. */
+ peerAsn?: number;
+ /** The contact information of the peer. */
+ peerContactInfo?: ContactInfo;
+ /** The name of the peer. */
+ peerName?: string;
+ /** The validation state of the ASN associated with the peer. */
+ validationState?: ValidationState;
+};
+
+/** Peering location is where connectivity could be established to the Microsoft Cloud Edge. */
+export type PeeringLocation = Resource & {
+ /** The kind of peering that the peering location supports. */
kind?: Kind;
- /**
- * The properties that define a direct peering location.
- */
+ /** The properties that define a direct peering location. */
direct?: PeeringLocationPropertiesDirect;
- /**
- * The properties that define an exchange peering location.
- */
+ /** The properties that define an exchange peering location. */
exchange?: PeeringLocationPropertiesExchange;
- /**
- * The name of the peering location.
- */
+ /** The name of the peering location. */
peeringLocation?: string;
- /**
- * The country in which the peering location exists.
- */
+ /** The country in which the peering location exists. */
country?: string;
- /**
- * The Azure region associated with the peering location.
- */
+ /** The Azure region associated with the peering location. */
azureRegion?: string;
-}
-
-/**
- * The resource tags.
- */
-export interface ResourceTags {
- /**
- * Gets or sets the tags, a dictionary of descriptors arm object
- */
- tags?: { [propertyName: string]: string };
-}
+};
-/**
- * PeeringService location
- */
-export interface PeeringServiceLocation extends Resource {
- /**
- * Country of the customer
- */
+/** PeeringService location */
+export type PeeringServiceLocation = Resource & {
+ /** Country of the customer */
country?: string;
- /**
- * State of the customer
- */
+ /** State of the customer */
state?: string;
- /**
- * Azure region for the location
- */
+ /** Azure region for the location */
azureRegion?: string;
-}
+};
-/**
- * The peering service prefix class.
- */
-export interface PeeringServicePrefix extends Resource {
- /**
- * Valid route prefix
- */
+/** The peering service prefix class. */
+export type PeeringServicePrefix = Resource & {
+ /** Valid route prefix */
prefix?: string;
- /**
- * The prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed',
- * 'Pending', 'Unknown'
- */
+ /** The prefix validation state */
prefixValidationState?: PrefixValidationState;
- /**
- * The prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession'
- */
+ /** The prefix learned type */
learnedType?: LearnedType;
/**
- * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating',
- * 'Deleting', 'Failed'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The provisioning state of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provisioningState?: ProvisioningState;
-}
+};
-/**
- * PeeringService provider
- */
-export interface PeeringServiceProvider extends Resource {
- /**
- * The name of the service provider.
- */
+/** PeeringService provider */
+export type PeeringServiceProvider = Resource & {
+ /** The name of the service provider. */
serviceProviderName?: string;
-}
+};
-/**
- * Peering Service
- */
-export interface PeeringService extends Resource {
- /**
- * The PeeringServiceLocation of the Customer.
- */
+/** Peering Service */
+export type PeeringService = Resource & {
+ /** The location of the resource. */
+ location: string;
+ /** The resource tags. */
+ tags?: { [propertyName: string]: string };
+ /** The PeeringServiceLocation of the Customer. */
peeringServiceLocation?: string;
- /**
- * The MAPS Provider Name.
- */
+ /** The MAPS Provider Name. */
peeringServiceProvider?: string;
/**
- * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating',
- * 'Deleting', 'Failed'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The provisioning state of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provisioningState?: ProvisioningState;
- /**
- * The location of the resource.
- */
- location: string;
- /**
- * The resource tags.
- */
- tags?: { [propertyName: string]: string };
+};
+
+/** Known values of {@link Enum0} that the service accepts. */
+export enum KnownEnum0 {
+ Available = "Available",
+ UnAvailable = "UnAvailable"
}
/**
- * The error response that indicates why an operation has failed.
+ * Defines values for Enum0. \
+ * {@link KnownEnum0} can be used interchangeably with Enum0,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Available** \
+ * **UnAvailable**
*/
-export interface ErrorResponse {
- /**
- * 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;
+export type Enum0 = string;
+
+/** Known values of {@link Enum1} that the service accepts. */
+export enum KnownEnum1 {
+ Direct = "Direct",
+ Exchange = "Exchange"
}
/**
- * Optional Parameters.
+ * Defines values for Enum1. \
+ * {@link KnownEnum1} can be used interchangeably with Enum1,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Direct** \
+ * **Exchange**
*/
-export interface PeeringManagementClientCheckServiceProviderAvailabilityOptionalParams extends msRest.RequestOptionsBase {
- /**
- * Gets or sets the PeeringServiceLocation
- */
- peeringServiceLocation?: string;
- /**
- * Gets or sets the PeeringServiceProvider
- */
- peeringServiceProvider?: string;
+export type Enum1 = string;
+
+/** Known values of {@link Name} that the service accepts. */
+export enum KnownName {
+ BasicExchangeFree = "Basic_Exchange_Free",
+ BasicDirectFree = "Basic_Direct_Free",
+ PremiumDirectFree = "Premium_Direct_Free",
+ PremiumExchangeMetered = "Premium_Exchange_Metered",
+ PremiumDirectMetered = "Premium_Direct_Metered",
+ PremiumDirectUnlimited = "Premium_Direct_Unlimited"
}
/**
- * Optional Parameters.
+ * Defines values for Name. \
+ * {@link KnownName} can be used interchangeably with Name,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Basic_Exchange_Free** \
+ * **Basic_Direct_Free** \
+ * **Premium_Direct_Free** \
+ * **Premium_Exchange_Metered** \
+ * **Premium_Direct_Metered** \
+ * **Premium_Direct_Unlimited**
*/
-export interface PeeringLocationsListOptionalParams extends msRest.RequestOptionsBase {
- /**
- * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'
- */
- directPeeringType?: DirectPeeringType1;
+export type Name = string;
+
+/** Known values of {@link Tier} that the service accepts. */
+export enum KnownTier {
+ Basic = "Basic",
+ Premium = "Premium"
}
/**
- * Optional Parameters.
+ * Defines values for Tier. \
+ * {@link KnownTier} can be used interchangeably with Tier,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Basic** \
+ * **Premium**
*/
-export interface PeeringsUpdateOptionalParams extends msRest.RequestOptionsBase {
- /**
- * Gets or sets the tags, a dictionary of descriptors arm object
- */
- tags?: { [propertyName: string]: string };
+export type Tier = string;
+
+/** Known values of {@link Family} that the service accepts. */
+export enum KnownFamily {
+ Direct = "Direct",
+ Exchange = "Exchange"
}
/**
- * Optional Parameters.
+ * Defines values for Family. \
+ * {@link KnownFamily} can be used interchangeably with Family,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Direct** \
+ * **Exchange**
*/
-export interface PeeringServicesUpdateOptionalParams extends msRest.RequestOptionsBase {
- /**
- * Gets or sets the tags, a dictionary of descriptors arm object
- */
- tags?: { [propertyName: string]: string };
+export type Family = string;
+
+/** Known values of {@link Size} that the service accepts. */
+export enum KnownSize {
+ Free = "Free",
+ Metered = "Metered",
+ Unlimited = "Unlimited"
}
/**
- * An interface representing PeeringManagementClientOptions.
+ * Defines values for Size. \
+ * {@link KnownSize} can be used interchangeably with Size,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Free** \
+ * **Metered** \
+ * **Unlimited**
*/
-export interface PeeringManagementClientOptions extends AzureServiceClientOptions {
- baseUri?: string;
+export type Size = string;
+
+/** Known values of {@link Kind} that the service accepts. */
+export enum KnownKind {
+ Direct = "Direct",
+ Exchange = "Exchange"
}
/**
- * @interface
- * The paginated list of peerings.
- * @extends Array
+ * Defines values for Kind. \
+ * {@link KnownKind} can be used interchangeably with Kind,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Direct** \
+ * **Exchange**
*/
-export interface PeeringListResult extends Array {
- /**
- * The link to fetch the next page of peerings.
- */
- nextLink?: string;
+export type Kind = string;
+
+/** Known values of {@link SessionAddressProvider} that the service accepts. */
+export enum KnownSessionAddressProvider {
+ Microsoft = "Microsoft",
+ Peer = "Peer"
}
/**
- * @interface
- * The paginated list of peering API operations.
- * @extends Array
- */
-export interface OperationListResult extends Array {
- /**
- * The link to fetch the next page of peering API operations.
- */
- nextLink?: string;
+ * Defines values for SessionAddressProvider. \
+ * {@link KnownSessionAddressProvider} can be used interchangeably with SessionAddressProvider,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Microsoft** \
+ * **Peer**
+ */
+export type SessionAddressProvider = string;
+
+/** Known values of {@link ConnectionState} that the service accepts. */
+export enum KnownConnectionState {
+ None = "None",
+ PendingApproval = "PendingApproval",
+ Approved = "Approved",
+ ProvisioningStarted = "ProvisioningStarted",
+ ProvisioningFailed = "ProvisioningFailed",
+ ProvisioningCompleted = "ProvisioningCompleted",
+ Validating = "Validating",
+ Active = "Active"
}
/**
- * @interface
- * The paginated list of peer ASNs.
- * @extends Array
- */
-export interface PeerAsnListResult extends Array {
- /**
- * The link to fetch the next page of peer ASNs.
- */
- nextLink?: string;
+ * Defines values for ConnectionState. \
+ * {@link KnownConnectionState} can be used interchangeably with ConnectionState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **PendingApproval** \
+ * **Approved** \
+ * **ProvisioningStarted** \
+ * **ProvisioningFailed** \
+ * **ProvisioningCompleted** \
+ * **Validating** \
+ * **Active**
+ */
+export type ConnectionState = string;
+
+/** Known values of {@link SessionStateV4} that the service accepts. */
+export enum KnownSessionStateV4 {
+ None = "None",
+ Idle = "Idle",
+ Connect = "Connect",
+ Active = "Active",
+ OpenSent = "OpenSent",
+ OpenConfirm = "OpenConfirm",
+ OpenReceived = "OpenReceived",
+ Established = "Established",
+ PendingAdd = "PendingAdd",
+ PendingUpdate = "PendingUpdate",
+ PendingRemove = "PendingRemove"
}
/**
- * @interface
- * The paginated list of peering locations.
- * @extends Array
- */
-export interface PeeringLocationListResult extends Array {
- /**
- * The link to fetch the next page of peering locations.
- */
- nextLink?: string;
+ * Defines values for SessionStateV4. \
+ * {@link KnownSessionStateV4} can be used interchangeably with SessionStateV4,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **Idle** \
+ * **Connect** \
+ * **Active** \
+ * **OpenSent** \
+ * **OpenConfirm** \
+ * **OpenReceived** \
+ * **Established** \
+ * **PendingAdd** \
+ * **PendingUpdate** \
+ * **PendingRemove**
+ */
+export type SessionStateV4 = string;
+
+/** Known values of {@link SessionStateV6} that the service accepts. */
+export enum KnownSessionStateV6 {
+ None = "None",
+ Idle = "Idle",
+ Connect = "Connect",
+ Active = "Active",
+ OpenSent = "OpenSent",
+ OpenConfirm = "OpenConfirm",
+ OpenReceived = "OpenReceived",
+ Established = "Established",
+ PendingAdd = "PendingAdd",
+ PendingUpdate = "PendingUpdate",
+ PendingRemove = "PendingRemove"
}
/**
- * @interface
- * The paginated list of peering service locations.
- * @extends Array
- */
-export interface PeeringServiceLocationListResult extends Array {
- /**
- * The link to fetch the next page of peering service locations.
- */
- nextLink?: string;
+ * Defines values for SessionStateV6. \
+ * {@link KnownSessionStateV6} can be used interchangeably with SessionStateV6,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **Idle** \
+ * **Connect** \
+ * **Active** \
+ * **OpenSent** \
+ * **OpenConfirm** \
+ * **OpenReceived** \
+ * **Established** \
+ * **PendingAdd** \
+ * **PendingUpdate** \
+ * **PendingRemove**
+ */
+export type SessionStateV6 = string;
+
+/** Known values of {@link DirectPeeringType} that the service accepts. */
+export enum KnownDirectPeeringType {
+ Edge = "Edge",
+ Transit = "Transit",
+ Cdn = "Cdn",
+ Internal = "Internal"
}
/**
- * @interface
- * The paginated list of [T].
- * @extends Array
+ * Defines values for DirectPeeringType. \
+ * {@link KnownDirectPeeringType} can be used interchangeably with DirectPeeringType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Edge** \
+ * **Transit** \
+ * **Cdn** \
+ * **Internal**
*/
-export interface PeeringServicePrefixListResult extends Array {
- /**
- * The link to fetch the next page of [T].
- */
- nextLink?: string;
+export type DirectPeeringType = string;
+
+/** Known values of {@link ProvisioningState} that the service accepts. */
+export enum KnownProvisioningState {
+ Succeeded = "Succeeded",
+ Updating = "Updating",
+ Deleting = "Deleting",
+ Failed = "Failed"
}
/**
- * @interface
- * The paginated list of peering service providers.
- * @extends Array
+ * Defines values for ProvisioningState. \
+ * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Succeeded** \
+ * **Updating** \
+ * **Deleting** \
+ * **Failed**
*/
-export interface PeeringServiceProviderListResult extends Array {
- /**
- * The link to fetch the next page of peering service providers.
- */
- nextLink?: string;
+export type ProvisioningState = string;
+
+/** Known values of {@link ValidationState} that the service accepts. */
+export enum KnownValidationState {
+ None = "None",
+ Pending = "Pending",
+ Approved = "Approved",
+ Failed = "Failed"
}
/**
- * @interface
- * The paginated list of peering services.
- * @extends Array
+ * Defines values for ValidationState. \
+ * {@link KnownValidationState} can be used interchangeably with ValidationState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **Pending** \
+ * **Approved** \
+ * **Failed**
*/
-export interface PeeringServiceListResult extends Array {
- /**
- * The link to fetch the next page of peering services.
- */
- nextLink?: string;
+export type ValidationState = string;
+
+/** Known values of {@link Enum14} that the service accepts. */
+export enum KnownEnum14 {
+ Direct = "Direct",
+ Exchange = "Exchange"
}
/**
- * Defines values for Name.
- * Possible values include: 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free',
- * 'Premium_Exchange_Metered', 'Premium_Direct_Metered', 'Premium_Direct_Unlimited'
- * @readonly
- * @enum {string}
+ * Defines values for Enum14. \
+ * {@link KnownEnum14} can be used interchangeably with Enum14,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Direct** \
+ * **Exchange**
*/
-export type Name = 'Basic_Exchange_Free' | 'Basic_Direct_Free' | 'Premium_Direct_Free' | 'Premium_Exchange_Metered' | 'Premium_Direct_Metered' | 'Premium_Direct_Unlimited';
+export type Enum14 = string;
-/**
- * Defines values for Tier.
- * Possible values include: 'Basic', 'Premium'
- * @readonly
- * @enum {string}
- */
-export type Tier = 'Basic' | 'Premium';
+/** Known values of {@link Enum15} that the service accepts. */
+export enum KnownEnum15 {
+ Edge = "Edge",
+ Transit = "Transit",
+ Cdn = "Cdn",
+ Internal = "Internal"
+}
/**
- * Defines values for Family.
- * Possible values include: 'Direct', 'Exchange'
- * @readonly
- * @enum {string}
- */
-export type Family = 'Direct' | 'Exchange';
+ * Defines values for Enum15. \
+ * {@link KnownEnum15} can be used interchangeably with Enum15,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Edge** \
+ * **Transit** \
+ * **Cdn** \
+ * **Internal**
+ */
+export type Enum15 = string;
+
+/** Known values of {@link PrefixValidationState} that the service accepts. */
+export enum KnownPrefixValidationState {
+ None = "None",
+ Invalid = "Invalid",
+ Verified = "Verified",
+ Failed = "Failed",
+ Pending = "Pending",
+ Unknown = "Unknown"
+}
/**
- * Defines values for Size.
- * Possible values include: 'Free', 'Metered', 'Unlimited'
- * @readonly
- * @enum {string}
- */
-export type Size = 'Free' | 'Metered' | 'Unlimited';
+ * Defines values for PrefixValidationState. \
+ * {@link KnownPrefixValidationState} can be used interchangeably with PrefixValidationState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **Invalid** \
+ * **Verified** \
+ * **Failed** \
+ * **Pending** \
+ * **Unknown**
+ */
+export type PrefixValidationState = string;
+
+/** Known values of {@link LearnedType} that the service accepts. */
+export enum KnownLearnedType {
+ None = "None",
+ ViaPartner = "ViaPartner",
+ ViaSession = "ViaSession"
+}
/**
- * Defines values for Kind.
- * Possible values include: 'Direct', 'Exchange'
- * @readonly
- * @enum {string}
+ * Defines values for LearnedType. \
+ * {@link KnownLearnedType} can be used interchangeably with LearnedType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **ViaPartner** \
+ * **ViaSession**
*/
-export type Kind = 'Direct' | 'Exchange';
+export type LearnedType = string;
-/**
- * Defines values for SessionAddressProvider.
- * Possible values include: 'Microsoft', 'Peer'
- * @readonly
- * @enum {string}
- */
-export type SessionAddressProvider = 'Microsoft' | 'Peer';
+/** Optional parameters. */
+export interface CheckServiceProviderAvailabilityOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for ConnectionState.
- * Possible values include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted',
- * 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'
- * @readonly
- * @enum {string}
- */
-export type ConnectionState = 'None' | 'PendingApproval' | 'Approved' | 'ProvisioningStarted' | 'ProvisioningFailed' | 'ProvisioningCompleted' | 'Validating' | 'Active';
+/** Contains response data for the checkServiceProviderAvailability operation. */
+export type CheckServiceProviderAvailabilityResponse = {
+ /** The parsed response body. */
+ body: Enum0;
+};
-/**
- * Defines values for SessionStateV4.
- * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm',
- * 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'
- * @readonly
- * @enum {string}
- */
-export type SessionStateV4 = 'None' | 'Idle' | 'Connect' | 'Active' | 'OpenSent' | 'OpenConfirm' | 'OpenReceived' | 'Established' | 'PendingAdd' | 'PendingUpdate' | 'PendingRemove';
+/** Optional parameters. */
+export interface LegacyPeeringsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for SessionStateV6.
- * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm',
- * 'OpenReceived', 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove'
- * @readonly
- * @enum {string}
- */
-export type SessionStateV6 = 'None' | 'Idle' | 'Connect' | 'Active' | 'OpenSent' | 'OpenConfirm' | 'OpenReceived' | 'Established' | 'PendingAdd' | 'PendingUpdate' | 'PendingRemove';
+/** Contains response data for the list operation. */
+export type LegacyPeeringsListResponse = PeeringListResult;
-/**
- * Defines values for DirectPeeringType.
- * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'
- * @readonly
- * @enum {string}
- */
-export type DirectPeeringType = 'Edge' | 'Transit' | 'Cdn' | 'Internal';
+/** Optional parameters. */
+export interface LegacyPeeringsListNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for ProvisioningState.
- * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- * @readonly
- * @enum {string}
- */
-export type ProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed';
+/** Contains response data for the listNext operation. */
+export type LegacyPeeringsListNextResponse = PeeringListResult;
-/**
- * Defines values for ValidationState.
- * Possible values include: 'None', 'Pending', 'Approved', 'Failed'
- * @readonly
- * @enum {string}
- */
-export type ValidationState = 'None' | 'Pending' | 'Approved' | 'Failed';
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for PrefixValidationState.
- * Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown'
- * @readonly
- * @enum {string}
- */
-export type PrefixValidationState = 'None' | 'Invalid' | 'Verified' | 'Failed' | 'Pending' | 'Unknown';
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationListResult;
-/**
- * Defines values for LearnedType.
- * Possible values include: 'None', 'ViaPartner', 'ViaSession'
- * @readonly
- * @enum {string}
- */
-export type LearnedType = 'None' | 'ViaPartner' | 'ViaSession';
+/** Optional parameters. */
+export interface OperationsListNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for DirectPeeringType1.
- * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal'
- * @readonly
- * @enum {string}
- */
-export type DirectPeeringType1 = 'Edge' | 'Transit' | 'Cdn' | 'Internal';
+/** Contains response data for the listNext operation. */
+export type OperationsListNextResponse = OperationListResult;
-/**
- * Defines values for CheckServiceProviderAvailabilityOKResponse.
- * Possible values include: 'Available', 'UnAvailable'
- * @readonly
- * @enum {string}
- */
-export type CheckServiceProviderAvailabilityOKResponse = 'Available' | 'UnAvailable';
+/** Optional parameters. */
+export interface PeerAsnsGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for Kind1.
- * Possible values include: 'Direct', 'Exchange'
- * @readonly
- * @enum {string}
- */
-export type Kind1 = 'Direct' | 'Exchange';
+/** Contains response data for the get operation. */
+export type PeerAsnsGetResponse = PeerAsn;
-/**
- * Defines values for Kind2.
- * Possible values include: 'Direct', 'Exchange'
- * @readonly
- * @enum {string}
- */
-export type Kind2 = 'Direct' | 'Exchange';
+/** Optional parameters. */
+export interface PeerAsnsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the checkServiceProviderAvailability operation.
- */
-export type CheckServiceProviderAvailabilityResponse = {
- /**
- * The parsed response body.
- */
- body: CheckServiceProviderAvailabilityOKResponse;
+/** Contains response data for the createOrUpdate operation. */
+export type PeerAsnsCreateOrUpdateResponse = PeerAsn;
- /**
- * 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: CheckServiceProviderAvailabilityOKResponse;
- };
-};
+/** Optional parameters. */
+export interface PeerAsnsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type LegacyPeeringsListResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Optional parameters. */
+export interface PeerAsnsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type LegacyPeeringsListNextResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Contains response data for the listBySubscription operation. */
+export type PeerAsnsListBySubscriptionResponse = PeerAsnListResult;
-/**
- * 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;
- };
-};
+/** Optional parameters. */
+export interface PeerAsnsListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * 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 listBySubscriptionNext operation. */
+export type PeerAsnsListBySubscriptionNextResponse = PeerAsnListResult;
-/**
- * Contains response data for the get operation.
- */
-export type PeerAsnsGetResponse = PeerAsn & {
- /**
- * 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: PeerAsn;
- };
-};
+/** Optional parameters. */
+export interface PeeringLocationsListOptionalParams
+ extends coreClient.OperationOptions {
+ /** The type of direct peering. */
+ directPeeringType?: Enum15;
+}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type PeerAsnsCreateOrUpdateResponse = PeerAsn & {
- /**
- * 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: PeerAsn;
- };
-};
+/** Contains response data for the list operation. */
+export type PeeringLocationsListResponse = PeeringLocationListResult;
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type PeerAsnsListBySubscriptionResponse = PeerAsnListResult & {
- /**
- * 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: PeerAsnListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringLocationsListNextOptionalParams
+ extends coreClient.OperationOptions {
+ /** The type of direct peering. */
+ directPeeringType?: Enum15;
+}
-/**
- * Contains response data for the listBySubscriptionNext operation.
- */
-export type PeerAsnsListBySubscriptionNextResponse = PeerAsnListResult & {
- /**
- * 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: PeerAsnListResult;
- };
-};
+/** Contains response data for the listNext operation. */
+export type PeeringLocationsListNextResponse = PeeringLocationListResult;
-/**
- * Contains response data for the list operation.
- */
-export type PeeringLocationsListResponse = PeeringLocationListResult & {
- /**
- * 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: PeeringLocationListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringsGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type PeeringLocationsListNextResponse = PeeringLocationListResult & {
- /**
- * 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: PeeringLocationListResult;
- };
-};
+/** Contains response data for the get operation. */
+export type PeeringsGetResponse = Peering;
-/**
- * Contains response data for the get operation.
- */
-export type PeeringsGetResponse = Peering & {
- /**
- * 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: Peering;
- };
-};
+/** Optional parameters. */
+export interface PeeringsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type PeeringsCreateOrUpdateResponse = Peering & {
- /**
- * 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: Peering;
- };
-};
+/** Contains response data for the createOrUpdate operation. */
+export type PeeringsCreateOrUpdateResponse = Peering;
-/**
- * Contains response data for the update operation.
- */
-export type PeeringsUpdateResponse = Peering & {
- /**
- * 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: Peering;
- };
-};
+/** Optional parameters. */
+export interface PeeringsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listByResourceGroup operation.
- */
-export type PeeringsListByResourceGroupResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringsUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type PeeringsListBySubscriptionResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Contains response data for the update operation. */
+export type PeeringsUpdateResponse = Peering;
-/**
- * Contains response data for the listByResourceGroupNext operation.
- */
-export type PeeringsListByResourceGroupNextResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringsListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listBySubscriptionNext operation.
- */
-export type PeeringsListBySubscriptionNextResponse = PeeringListResult & {
- /**
- * 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: PeeringListResult;
- };
-};
+/** Contains response data for the listByResourceGroup operation. */
+export type PeeringsListByResourceGroupResponse = PeeringListResult;
-/**
- * Contains response data for the list operation.
- */
-export type PeeringServiceLocationsListResponse = PeeringServiceLocationListResult & {
- /**
- * 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: PeeringServiceLocationListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type PeeringServiceLocationsListNextResponse = PeeringServiceLocationListResult & {
- /**
- * 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: PeeringServiceLocationListResult;
- };
-};
+/** Contains response data for the listBySubscription operation. */
+export type PeeringsListBySubscriptionResponse = PeeringListResult;
-/**
- * Contains response data for the get operation.
- */
-export type PeeringServicePrefixesGetResponse = PeeringServicePrefix & {
- /**
- * 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: PeeringServicePrefix;
- };
-};
+/** Optional parameters. */
+export interface PeeringsListByResourceGroupNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type PeeringServicePrefixesCreateOrUpdateResponse = PeeringServicePrefix & {
- /**
- * 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: PeeringServicePrefix;
- };
-};
+/** Contains response data for the listByResourceGroupNext operation. */
+export type PeeringsListByResourceGroupNextResponse = PeeringListResult;
-/**
- * Contains response data for the listByPeeringService operation.
- */
-export type PrefixesListByPeeringServiceResponse = PeeringServicePrefixListResult & {
- /**
- * 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: PeeringServicePrefixListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringsListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listByPeeringServiceNext operation.
- */
-export type PrefixesListByPeeringServiceNextResponse = PeeringServicePrefixListResult & {
- /**
- * 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: PeeringServicePrefixListResult;
- };
-};
+/** Contains response data for the listBySubscriptionNext operation. */
+export type PeeringsListBySubscriptionNextResponse = PeeringListResult;
-/**
- * Contains response data for the list operation.
- */
-export type PeeringServiceProvidersListResponse = PeeringServiceProviderListResult & {
- /**
- * 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: PeeringServiceProviderListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringServiceLocationsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type PeeringServiceProvidersListNextResponse = PeeringServiceProviderListResult & {
- /**
- * 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: PeeringServiceProviderListResult;
- };
-};
+/** Contains response data for the list operation. */
+export type PeeringServiceLocationsListResponse = PeeringServiceLocationListResult;
-/**
- * Contains response data for the get operation.
- */
-export type PeeringServicesGetResponse = PeeringService & {
- /**
- * 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: PeeringService;
- };
-};
+/** Optional parameters. */
+export interface PeeringServiceLocationsListNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type PeeringServicesCreateOrUpdateResponse = PeeringService & {
- /**
- * 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: PeeringService;
- };
-};
+/** Contains response data for the listNext operation. */
+export type PeeringServiceLocationsListNextResponse = PeeringServiceLocationListResult;
-/**
- * Contains response data for the update operation.
- */
-export type PeeringServicesUpdateResponse = PeeringService & {
- /**
- * 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: PeeringService;
- };
-};
+/** Optional parameters. */
+export interface PeeringServicePrefixesGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listByResourceGroup operation.
- */
-export type PeeringServicesListByResourceGroupResponse = PeeringServiceListResult & {
- /**
- * 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: PeeringServiceListResult;
- };
-};
+/** Contains response data for the get operation. */
+export type PeeringServicePrefixesGetResponse = PeeringServicePrefix;
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type PeeringServicesListBySubscriptionResponse = PeeringServiceListResult & {
- /**
- * 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: PeeringServiceListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringServicePrefixesCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listByResourceGroupNext operation.
- */
-export type PeeringServicesListByResourceGroupNextResponse = PeeringServiceListResult & {
- /**
- * 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: PeeringServiceListResult;
- };
-};
+/** Contains response data for the createOrUpdate operation. */
+export type PeeringServicePrefixesCreateOrUpdateResponse = PeeringServicePrefix;
-/**
- * Contains response data for the listBySubscriptionNext operation.
- */
-export type PeeringServicesListBySubscriptionNextResponse = PeeringServiceListResult & {
- /**
- * 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: PeeringServiceListResult;
- };
-};
+/** Optional parameters. */
+export interface PeeringServicePrefixesDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface PrefixesListByPeeringServiceOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByPeeringService operation. */
+export type PrefixesListByPeeringServiceResponse = PeeringServicePrefixListResult;
+
+/** Optional parameters. */
+export interface PrefixesListByPeeringServiceNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByPeeringServiceNext operation. */
+export type PrefixesListByPeeringServiceNextResponse = PeeringServicePrefixListResult;
+
+/** Optional parameters. */
+export interface PeeringServiceProvidersListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type PeeringServiceProvidersListResponse = PeeringServiceProviderListResult;
+
+/** Optional parameters. */
+export interface PeeringServiceProvidersListNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listNext operation. */
+export type PeeringServiceProvidersListNextResponse = PeeringServiceProviderListResult;
+
+/** Optional parameters. */
+export interface PeeringServicesGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type PeeringServicesGetResponse = PeeringService;
+
+/** Optional parameters. */
+export interface PeeringServicesCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the createOrUpdate operation. */
+export type PeeringServicesCreateOrUpdateResponse = PeeringService;
+
+/** Optional parameters. */
+export interface PeeringServicesDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface PeeringServicesUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the update operation. */
+export type PeeringServicesUpdateResponse = PeeringService;
+
+/** Optional parameters. */
+export interface PeeringServicesListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByResourceGroup operation. */
+export type PeeringServicesListByResourceGroupResponse = PeeringServiceListResult;
+
+/** Optional parameters. */
+export interface PeeringServicesListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscription operation. */
+export type PeeringServicesListBySubscriptionResponse = PeeringServiceListResult;
+
+/** Optional parameters. */
+export interface PeeringServicesListByResourceGroupNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByResourceGroupNext operation. */
+export type PeeringServicesListByResourceGroupNextResponse = PeeringServiceListResult;
+
+/** Optional parameters. */
+export interface PeeringServicesListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscriptionNext operation. */
+export type PeeringServicesListBySubscriptionNextResponse = PeeringServiceListResult;
+
+/** Optional parameters. */
+export interface PeeringManagementClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts b/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts
deleted file mode 100644
index 147e9d528f40..000000000000
--- a/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringListResult,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/mappers.ts b/sdk/peering/arm-peering/src/models/mappers.ts
index 534d6d8012e8..c65835f57b1e 100644
--- a/sdk/peering/arm-peering/src/models/mappers.ts
+++ b/sdk/peering/arm-peering/src/models/mappers.ts
@@ -1,19 +1,14 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * 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";
+import * as coreClient from "@azure/core-client";
-export const CloudError = CloudErrorMapper;
-export const BaseResource = BaseResourceMapper;
-
-export const CheckServiceProviderAvailabilityInput: msRest.CompositeMapper = {
- serializedName: "CheckServiceProviderAvailabilityInput",
+export const CheckServiceProviderAvailabilityInput: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CheckServiceProviderAvailabilityInput",
@@ -34,32 +29,21 @@ export const CheckServiceProviderAvailabilityInput: msRest.CompositeMapper = {
}
};
-export const PeeringSku: msRest.CompositeMapper = {
- serializedName: "PeeringSku",
+export const ErrorResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringSku",
+ className: "ErrorResponse",
modelProperties: {
- name: {
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- tier: {
- serializedName: "tier",
- type: {
- name: "String"
- }
- },
- family: {
- serializedName: "family",
+ code: {
+ serializedName: "code",
+ readOnly: true,
type: {
name: "String"
}
},
- size: {
- serializedName: "size",
+ message: {
+ serializedName: "message",
+ readOnly: true,
type: {
name: "String"
}
@@ -68,78 +52,98 @@ export const PeeringSku: msRest.CompositeMapper = {
}
};
-export const BgpSession: msRest.CompositeMapper = {
- serializedName: "BgpSession",
+export const PeeringListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "BgpSession",
+ className: "PeeringListResult",
modelProperties: {
- sessionPrefixV4: {
- serializedName: "sessionPrefixV4",
- type: {
- name: "String"
- }
- },
- sessionPrefixV6: {
- serializedName: "sessionPrefixV6",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Peering"
+ }
+ }
}
},
- microsoftSessionIPv4Address: {
- readOnly: true,
- serializedName: "microsoftSessionIPv4Address",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
- },
- microsoftSessionIPv6Address: {
- readOnly: true,
- serializedName: "microsoftSessionIPv6Address",
+ }
+ }
+ }
+};
+
+export const PeeringSku: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PeeringSku",
+ modelProperties: {
+ name: {
+ serializedName: "name",
type: {
name: "String"
}
},
- peerSessionIPv4Address: {
- serializedName: "peerSessionIPv4Address",
+ tier: {
+ serializedName: "tier",
type: {
name: "String"
}
},
- peerSessionIPv6Address: {
- serializedName: "peerSessionIPv6Address",
+ family: {
+ serializedName: "family",
type: {
name: "String"
}
},
- sessionStateV4: {
- readOnly: true,
- serializedName: "sessionStateV4",
+ size: {
+ serializedName: "size",
type: {
name: "String"
}
- },
- sessionStateV6: {
- readOnly: true,
- serializedName: "sessionStateV6",
+ }
+ }
+ }
+};
+
+export const PeeringPropertiesDirect: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PeeringPropertiesDirect",
+ modelProperties: {
+ connections: {
+ serializedName: "connections",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "DirectConnection"
+ }
+ }
}
},
- maxPrefixesAdvertisedV4: {
- serializedName: "maxPrefixesAdvertisedV4",
+ useForPeeringService: {
+ serializedName: "useForPeeringService",
type: {
- name: "Number"
+ name: "Boolean"
}
},
- maxPrefixesAdvertisedV6: {
- serializedName: "maxPrefixesAdvertisedV6",
+ peerAsn: {
+ serializedName: "peerAsn",
type: {
- name: "Number"
+ name: "Composite",
+ className: "SubResource"
}
},
- md5AuthenticationKey: {
- serializedName: "md5AuthenticationKey",
+ directPeeringType: {
+ serializedName: "directPeeringType",
type: {
name: "String"
}
@@ -148,8 +152,7 @@ export const BgpSession: msRest.CompositeMapper = {
}
};
-export const DirectConnection: msRest.CompositeMapper = {
- serializedName: "DirectConnection",
+export const DirectConnection: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "DirectConnection",
@@ -185,8 +188,8 @@ export const DirectConnection: msRest.CompositeMapper = {
}
},
connectionState: {
- readOnly: true,
serializedName: "connectionState",
+ readOnly: true,
type: {
name: "String"
}
@@ -208,8 +211,86 @@ export const DirectConnection: msRest.CompositeMapper = {
}
};
-export const SubResource: msRest.CompositeMapper = {
- serializedName: "SubResource",
+export const BgpSession: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "BgpSession",
+ modelProperties: {
+ sessionPrefixV4: {
+ serializedName: "sessionPrefixV4",
+ type: {
+ name: "String"
+ }
+ },
+ sessionPrefixV6: {
+ serializedName: "sessionPrefixV6",
+ type: {
+ name: "String"
+ }
+ },
+ microsoftSessionIPv4Address: {
+ serializedName: "microsoftSessionIPv4Address",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ microsoftSessionIPv6Address: {
+ serializedName: "microsoftSessionIPv6Address",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ peerSessionIPv4Address: {
+ serializedName: "peerSessionIPv4Address",
+ type: {
+ name: "String"
+ }
+ },
+ peerSessionIPv6Address: {
+ serializedName: "peerSessionIPv6Address",
+ type: {
+ name: "String"
+ }
+ },
+ sessionStateV4: {
+ serializedName: "sessionStateV4",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ sessionStateV6: {
+ serializedName: "sessionStateV6",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ maxPrefixesAdvertisedV4: {
+ serializedName: "maxPrefixesAdvertisedV4",
+ type: {
+ name: "Number"
+ }
+ },
+ maxPrefixesAdvertisedV6: {
+ serializedName: "maxPrefixesAdvertisedV6",
+ type: {
+ name: "Number"
+ }
+ },
+ md5AuthenticationKey: {
+ serializedName: "md5AuthenticationKey",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const SubResource: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "SubResource",
@@ -224,11 +305,10 @@ export const SubResource: msRest.CompositeMapper = {
}
};
-export const PeeringPropertiesDirect: msRest.CompositeMapper = {
- serializedName: "PeeringPropertiesDirect",
+export const PeeringPropertiesExchange: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringPropertiesDirect",
+ className: "PeeringPropertiesExchange",
modelProperties: {
connections: {
serializedName: "connections",
@@ -237,36 +317,23 @@ export const PeeringPropertiesDirect: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "DirectConnection"
+ className: "ExchangeConnection"
}
}
}
},
- useForPeeringService: {
- serializedName: "useForPeeringService",
- type: {
- name: "Boolean"
- }
- },
peerAsn: {
serializedName: "peerAsn",
type: {
name: "Composite",
className: "SubResource"
}
- },
- directPeeringType: {
- serializedName: "directPeeringType",
- type: {
- name: "String"
- }
}
}
}
};
-export const ExchangeConnection: msRest.CompositeMapper = {
- serializedName: "ExchangeConnection",
+export const ExchangeConnection: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ExchangeConnection",
@@ -278,8 +345,8 @@ export const ExchangeConnection: msRest.CompositeMapper = {
}
},
connectionState: {
- readOnly: true,
serializedName: "connectionState",
+ readOnly: true,
type: {
name: "String"
}
@@ -301,58 +368,28 @@ export const ExchangeConnection: msRest.CompositeMapper = {
}
};
-export const PeeringPropertiesExchange: msRest.CompositeMapper = {
- serializedName: "PeeringPropertiesExchange",
- type: {
- name: "Composite",
- className: "PeeringPropertiesExchange",
- modelProperties: {
- connections: {
- serializedName: "connections",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ExchangeConnection"
- }
- }
- }
- },
- peerAsn: {
- serializedName: "peerAsn",
- type: {
- name: "Composite",
- className: "SubResource"
- }
- }
- }
- }
-};
-
-export const Resource: msRest.CompositeMapper = {
- serializedName: "Resource",
+export const Resource: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "Resource",
modelProperties: {
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
id: {
- readOnly: true,
serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
type: {
- readOnly: true,
serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
@@ -361,149 +398,101 @@ export const Resource: msRest.CompositeMapper = {
}
};
-export const Peering: msRest.CompositeMapper = {
- serializedName: "Peering",
+export const OperationListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Peering",
+ className: "OperationListResult",
modelProperties: {
- ...Resource.type.modelProperties,
- sku: {
- required: true,
- serializedName: "sku",
+ value: {
+ serializedName: "value",
type: {
- name: "Composite",
- className: "PeeringSku"
- }
- },
- kind: {
- required: true,
- serializedName: "kind",
- type: {
- name: "String"
- }
- },
- direct: {
- serializedName: "properties.direct",
- type: {
- name: "Composite",
- className: "PeeringPropertiesDirect"
- }
- },
- exchange: {
- serializedName: "properties.exchange",
- type: {
- name: "Composite",
- className: "PeeringPropertiesExchange"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
}
},
- peeringLocation: {
- serializedName: "properties.peeringLocation",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
- },
- provisioningState: {
+ }
+ }
+ }
+};
+
+export const Operation: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
readOnly: true,
- serializedName: "properties.provisioningState",
type: {
name: "String"
}
},
- location: {
- required: true,
- serializedName: "location",
+ display: {
+ serializedName: "display",
type: {
- name: "String"
+ name: "Composite",
+ className: "OperationDisplayInfo"
}
},
- tags: {
- serializedName: "tags",
+ isDataAction: {
+ serializedName: "isDataAction",
+ readOnly: true,
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
+ name: "Boolean"
}
}
}
}
};
-export const OperationDisplayInfo: msRest.CompositeMapper = {
- serializedName: "OperationDisplayInfo",
+export const OperationDisplayInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationDisplayInfo",
modelProperties: {
provider: {
- readOnly: true,
serializedName: "provider",
+ readOnly: true,
type: {
name: "String"
}
},
resource: {
- readOnly: true,
serializedName: "resource",
+ readOnly: true,
type: {
name: "String"
}
},
operation: {
- readOnly: true,
serializedName: "operation",
+ readOnly: true,
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"
}
- },
- display: {
- readOnly: true,
- serializedName: "display",
- type: {
- name: "Composite",
- className: "OperationDisplayInfo"
- }
- },
- isDataAction: {
- readOnly: true,
- serializedName: "isDataAction",
- type: {
- name: "Boolean"
- }
}
}
}
};
-export const ContactInfo: msRest.CompositeMapper = {
- serializedName: "ContactInfo",
+export const ContactInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ContactInfo",
@@ -534,44 +523,94 @@ export const ContactInfo: msRest.CompositeMapper = {
}
};
-export const PeerAsn: msRest.CompositeMapper = {
- serializedName: "PeerAsn",
+export const PeerAsnListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeerAsn",
+ className: "PeerAsnListResult",
modelProperties: {
- ...Resource.type.modelProperties,
- peerAsn: {
- serializedName: "properties.peerAsn",
+ value: {
+ serializedName: "value",
type: {
- name: "Number"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeerAsn"
+ }
+ }
}
},
- peerContactInfo: {
- serializedName: "properties.peerContactInfo",
+ nextLink: {
+ serializedName: "nextLink",
type: {
- name: "Composite",
- className: "ContactInfo"
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const PeeringLocationListResult: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PeeringLocationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeeringLocation"
+ }
+ }
}
},
- peerName: {
- serializedName: "properties.peerName",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
+ }
+ }
+ }
+};
+
+export const PeeringLocationPropertiesDirect: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PeeringLocationPropertiesDirect",
+ modelProperties: {
+ peeringFacilities: {
+ serializedName: "peeringFacilities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "DirectPeeringFacility"
+ }
+ }
+ }
},
- validationState: {
- serializedName: "properties.validationState",
+ bandwidthOffers: {
+ serializedName: "bandwidthOffers",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeeringBandwidthOffer"
+ }
+ }
}
}
}
}
};
-export const DirectPeeringFacility: msRest.CompositeMapper = {
- serializedName: "DirectPeeringFacility",
+export const DirectPeeringFacility: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "DirectPeeringFacility",
@@ -604,8 +643,7 @@ export const DirectPeeringFacility: msRest.CompositeMapper = {
}
};
-export const PeeringBandwidthOffer: msRest.CompositeMapper = {
- serializedName: "PeeringBandwidthOffer",
+export const PeeringBandwidthOffer: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "PeeringBandwidthOffer",
@@ -626,11 +664,10 @@ export const PeeringBandwidthOffer: msRest.CompositeMapper = {
}
};
-export const PeeringLocationPropertiesDirect: msRest.CompositeMapper = {
- serializedName: "PeeringLocationPropertiesDirect",
+export const PeeringLocationPropertiesExchange: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringLocationPropertiesDirect",
+ className: "PeeringLocationPropertiesExchange",
modelProperties: {
peeringFacilities: {
serializedName: "peeringFacilities",
@@ -639,19 +676,7 @@ export const PeeringLocationPropertiesDirect: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "DirectPeeringFacility"
- }
- }
- }
- },
- bandwidthOffers: {
- serializedName: "bandwidthOffers",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringBandwidthOffer"
+ className: "ExchangePeeringFacility"
}
}
}
@@ -660,8 +685,7 @@ export const PeeringLocationPropertiesDirect: msRest.CompositeMapper = {
}
};
-export const ExchangePeeringFacility: msRest.CompositeMapper = {
- serializedName: "ExchangePeeringFacility",
+export const ExchangePeeringFacility: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ExchangePeeringFacility",
@@ -718,69 +742,41 @@ export const ExchangePeeringFacility: msRest.CompositeMapper = {
}
};
-export const PeeringLocationPropertiesExchange: msRest.CompositeMapper = {
- serializedName: "PeeringLocationPropertiesExchange",
+export const ResourceTags: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringLocationPropertiesExchange",
+ className: "ResourceTags",
modelProperties: {
- peeringFacilities: {
- serializedName: "peeringFacilities",
+ tags: {
+ serializedName: "tags",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "ExchangePeeringFacility"
- }
- }
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
}
}
}
};
-export const PeeringLocation: msRest.CompositeMapper = {
- serializedName: "PeeringLocation",
+export const PeeringServiceLocationListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringLocation",
+ className: "PeeringServiceLocationListResult",
modelProperties: {
- ...Resource.type.modelProperties,
- kind: {
- serializedName: "kind",
- type: {
- name: "String"
- }
- },
- direct: {
- serializedName: "properties.direct",
- type: {
- name: "Composite",
- className: "PeeringLocationPropertiesDirect"
- }
- },
- exchange: {
- serializedName: "properties.exchange",
- type: {
- name: "Composite",
- className: "PeeringLocationPropertiesExchange"
- }
- },
- peeringLocation: {
- serializedName: "properties.peeringLocation",
- type: {
- name: "String"
- }
- },
- country: {
- serializedName: "properties.country",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeeringServiceLocation"
+ }
+ }
}
},
- azureRegion: {
- serializedName: "properties.azureRegion",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
@@ -789,48 +785,79 @@ export const PeeringLocation: msRest.CompositeMapper = {
}
};
-export const ResourceTags: msRest.CompositeMapper = {
- serializedName: "ResourceTags",
+export const PeeringServicePrefixListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ResourceTags",
+ className: "PeeringServicePrefixListResult",
modelProperties: {
- tags: {
- serializedName: "tags",
+ value: {
+ serializedName: "value",
type: {
- name: "Dictionary",
- value: {
+ name: "Sequence",
+ element: {
type: {
- name: "String"
+ name: "Composite",
+ className: "PeeringServicePrefix"
}
}
}
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
}
}
}
};
-export const PeeringServiceLocation: msRest.CompositeMapper = {
- serializedName: "PeeringServiceLocation",
+export const PeeringServiceProviderListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringServiceLocation",
+ className: "PeeringServiceProviderListResult",
modelProperties: {
- ...Resource.type.modelProperties,
- country: {
- serializedName: "properties.country",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeeringServiceProvider"
+ }
+ }
}
},
- state: {
- serializedName: "properties.state",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
+ }
+ }
+ }
+};
+
+export const PeeringServiceListResult: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PeeringServiceListResult",
+ modelProperties: {
+ value: {
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PeeringService"
+ }
+ }
+ }
},
- azureRegion: {
- serializedName: "properties.azureRegion",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
@@ -839,34 +866,63 @@ export const PeeringServiceLocation: msRest.CompositeMapper = {
}
};
-export const PeeringServicePrefix: msRest.CompositeMapper = {
- serializedName: "PeeringServicePrefix",
+export const Peering: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringServicePrefix",
+ className: "Peering",
modelProperties: {
...Resource.type.modelProperties,
- prefix: {
- serializedName: "properties.prefix",
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "Composite",
+ className: "PeeringSku"
+ }
+ },
+ kind: {
+ serializedName: "kind",
+ required: true,
type: {
name: "String"
}
},
- prefixValidationState: {
- serializedName: "properties.prefixValidationState",
+ location: {
+ serializedName: "location",
+ required: true,
type: {
name: "String"
}
},
- learnedType: {
- serializedName: "properties.learnedType",
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ direct: {
+ serializedName: "properties.direct",
+ type: {
+ name: "Composite",
+ className: "PeeringPropertiesDirect"
+ }
+ },
+ exchange: {
+ serializedName: "properties.exchange",
+ type: {
+ name: "Composite",
+ className: "PeeringPropertiesExchange"
+ }
+ },
+ peeringLocation: {
+ serializedName: "properties.peeringLocation",
type: {
name: "String"
}
},
provisioningState: {
- readOnly: true,
serializedName: "properties.provisioningState",
+ readOnly: true,
type: {
name: "String"
}
@@ -875,15 +931,33 @@ export const PeeringServicePrefix: msRest.CompositeMapper = {
}
};
-export const PeeringServiceProvider: msRest.CompositeMapper = {
- serializedName: "PeeringServiceProvider",
+export const PeerAsn: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringServiceProvider",
+ className: "PeerAsn",
modelProperties: {
...Resource.type.modelProperties,
- serviceProviderName: {
- serializedName: "properties.serviceProviderName",
+ peerAsn: {
+ serializedName: "properties.peerAsn",
+ type: {
+ name: "Number"
+ }
+ },
+ peerContactInfo: {
+ serializedName: "properties.peerContactInfo",
+ type: {
+ name: "Composite",
+ className: "ContactInfo"
+ }
+ },
+ peerName: {
+ serializedName: "properties.peerName",
+ type: {
+ name: "String"
+ }
+ },
+ validationState: {
+ serializedName: "properties.validationState",
type: {
name: "String"
}
@@ -892,70 +966,46 @@ export const PeeringServiceProvider: msRest.CompositeMapper = {
}
};
-export const PeeringService: msRest.CompositeMapper = {
- serializedName: "PeeringService",
+export const PeeringLocation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringService",
+ className: "PeeringLocation",
modelProperties: {
...Resource.type.modelProperties,
- peeringServiceLocation: {
- serializedName: "properties.peeringServiceLocation",
+ kind: {
+ serializedName: "kind",
type: {
name: "String"
}
},
- peeringServiceProvider: {
- serializedName: "properties.peeringServiceProvider",
+ direct: {
+ serializedName: "properties.direct",
type: {
- name: "String"
+ name: "Composite",
+ className: "PeeringLocationPropertiesDirect"
}
},
- provisioningState: {
- readOnly: true,
- serializedName: "properties.provisioningState",
+ exchange: {
+ serializedName: "properties.exchange",
type: {
- name: "String"
+ name: "Composite",
+ className: "PeeringLocationPropertiesExchange"
}
},
- location: {
- required: true,
- serializedName: "location",
+ peeringLocation: {
+ serializedName: "properties.peeringLocation",
type: {
name: "String"
}
},
- tags: {
- serializedName: "tags",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
- }
- }
- }
- }
-};
-
-export const ErrorResponse: msRest.CompositeMapper = {
- serializedName: "ErrorResponse",
- type: {
- name: "Composite",
- className: "ErrorResponse",
- modelProperties: {
- code: {
- readOnly: true,
- serializedName: "code",
+ country: {
+ serializedName: "properties.country",
type: {
name: "String"
}
},
- message: {
- readOnly: true,
- serializedName: "message",
+ azureRegion: {
+ serializedName: "properties.azureRegion",
type: {
name: "String"
}
@@ -964,54 +1014,26 @@ export const ErrorResponse: msRest.CompositeMapper = {
}
};
-export const PeeringListResult: msRest.CompositeMapper = {
- serializedName: "PeeringListResult",
+export const PeeringServiceLocation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringListResult",
+ className: "PeeringServiceLocation",
modelProperties: {
- value: {
- serializedName: "",
+ ...Resource.type.modelProperties,
+ country: {
+ serializedName: "properties.country",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Peering"
- }
- }
+ name: "String"
}
},
- nextLink: {
- serializedName: "nextLink",
+ state: {
+ serializedName: "properties.state",
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const OperationListResult: msRest.CompositeMapper = {
- serializedName: "OperationListResult",
- type: {
- name: "Composite",
- className: "OperationListResult",
- modelProperties: {
- value: {
- serializedName: "",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Operation"
- }
- }
- }
},
- nextLink: {
- serializedName: "nextLink",
+ azureRegion: {
+ serializedName: "properties.azureRegion",
type: {
name: "String"
}
@@ -1020,54 +1042,33 @@ export const OperationListResult: msRest.CompositeMapper = {
}
};
-export const PeerAsnListResult: msRest.CompositeMapper = {
- serializedName: "PeerAsnListResult",
+export const PeeringServicePrefix: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeerAsnListResult",
+ className: "PeeringServicePrefix",
modelProperties: {
- value: {
- serializedName: "",
+ ...Resource.type.modelProperties,
+ prefix: {
+ serializedName: "properties.prefix",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeerAsn"
- }
- }
+ name: "String"
}
},
- nextLink: {
- serializedName: "nextLink",
+ prefixValidationState: {
+ serializedName: "properties.prefixValidationState",
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const PeeringLocationListResult: msRest.CompositeMapper = {
- serializedName: "PeeringLocationListResult",
- type: {
- name: "Composite",
- className: "PeeringLocationListResult",
- modelProperties: {
- value: {
- serializedName: "",
+ },
+ learnedType: {
+ serializedName: "properties.learnedType",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringLocation"
- }
- }
+ name: "String"
}
},
- nextLink: {
- serializedName: "nextLink",
+ provisioningState: {
+ serializedName: "properties.provisioningState",
+ readOnly: true,
type: {
name: "String"
}
@@ -1076,26 +1077,14 @@ export const PeeringLocationListResult: msRest.CompositeMapper = {
}
};
-export const PeeringServiceLocationListResult: msRest.CompositeMapper = {
- serializedName: "PeeringServiceLocationListResult",
+export const PeeringServiceProvider: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringServiceLocationListResult",
+ className: "PeeringServiceProvider",
modelProperties: {
- value: {
- serializedName: "",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringServiceLocation"
- }
- }
- }
- },
- nextLink: {
- serializedName: "nextLink",
+ ...Resource.type.modelProperties,
+ serviceProviderName: {
+ serializedName: "properties.serviceProviderName",
type: {
name: "String"
}
@@ -1104,82 +1093,41 @@ export const PeeringServiceLocationListResult: msRest.CompositeMapper = {
}
};
-export const PeeringServicePrefixListResult: msRest.CompositeMapper = {
- serializedName: "PeeringServicePrefixListResult",
+export const PeeringService: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PeeringServicePrefixListResult",
+ className: "PeeringService",
modelProperties: {
- value: {
- serializedName: "",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringServicePrefix"
- }
- }
- }
- },
- nextLink: {
- serializedName: "nextLink",
+ ...Resource.type.modelProperties,
+ location: {
+ serializedName: "location",
+ required: true,
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const PeeringServiceProviderListResult: msRest.CompositeMapper = {
- serializedName: "PeeringServiceProviderListResult",
- type: {
- name: "Composite",
- className: "PeeringServiceProviderListResult",
- modelProperties: {
- value: {
- serializedName: "",
+ },
+ tags: {
+ serializedName: "tags",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringServiceProvider"
- }
- }
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
},
- nextLink: {
- serializedName: "nextLink",
+ peeringServiceLocation: {
+ serializedName: "properties.peeringServiceLocation",
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const PeeringServiceListResult: msRest.CompositeMapper = {
- serializedName: "PeeringServiceListResult",
- type: {
- name: "Composite",
- className: "PeeringServiceListResult",
- modelProperties: {
- value: {
- serializedName: "",
+ },
+ peeringServiceProvider: {
+ serializedName: "properties.peeringServiceProvider",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PeeringService"
- }
- }
+ name: "String"
}
},
- nextLink: {
- serializedName: "nextLink",
+ provisioningState: {
+ serializedName: "properties.provisioningState",
+ readOnly: true,
type: {
name: "String"
}
diff --git a/sdk/peering/arm-peering/src/models/operationsMappers.ts b/sdk/peering/arm-peering/src/models/operationsMappers.ts
deleted file mode 100644
index 41b000418950..000000000000
--- a/sdk/peering/arm-peering/src/models/operationsMappers.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- ErrorResponse,
- Operation,
- OperationDisplayInfo,
- OperationListResult
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/parameters.ts b/sdk/peering/arm-peering/src/models/parameters.ts
index e9e0cef438b5..07dcac4641c5 100644
--- a/sdk/peering/arm-peering/src/models/parameters.ts
+++ b/sdk/peering/arm-peering/src/models/parameters.ts
@@ -1,135 +1,220 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
+import {
+ OperationParameter,
+ OperationURLParameter,
+ OperationQueryParameter
+} from "@azure/core-client";
+import {
+ CheckServiceProviderAvailabilityInput as CheckServiceProviderAvailabilityInputMapper,
+ PeerAsn as PeerAsnMapper,
+ Peering as PeeringMapper,
+ ResourceTags as ResourceTagsMapper,
+ PeeringServicePrefix as PeeringServicePrefixMapper,
+ PeeringService as PeeringServiceMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const checkServiceProviderAvailabilityInput: OperationParameter = {
+ parameterPath: "checkServiceProviderAvailabilityInput",
+ mapper: CheckServiceProviderAvailabilityInputMapper
+};
+
+export const accept: OperationParameter = {
+ parameterPath: "accept",
+ mapper: {
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
+ mapper: {
+ serializedName: "$host",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ serializedName: "subscriptionId",
required: true,
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2019-08-01-preview",
+ isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
-export const directPeeringType: msRest.OperationQueryParameter = {
- parameterPath: [
- "options",
- "directPeeringType"
- ],
+
+export const peeringLocation: OperationQueryParameter = {
+ parameterPath: "peeringLocation",
mapper: {
- serializedName: "directPeeringType",
+ serializedName: "peeringLocation",
+ required: true,
type: {
name: "String"
}
}
};
-export const kind: msRest.OperationQueryParameter = {
+
+export const kind: OperationQueryParameter = {
parameterPath: "kind",
mapper: {
- required: true,
serializedName: "kind",
+ required: true,
type: {
name: "String"
}
}
};
-export const nextPageLink: msRest.OperationURLParameter = {
- parameterPath: "nextPageLink",
+
+export const nextLink: OperationURLParameter = {
+ parameterPath: "nextLink",
mapper: {
- required: true,
serializedName: "nextLink",
+ required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
-export const peerAsnName: msRest.OperationURLParameter = {
+
+export const peerAsnName: OperationURLParameter = {
parameterPath: "peerAsnName",
mapper: {
- required: true,
serializedName: "peerAsnName",
+ required: true,
type: {
name: "String"
}
}
};
-export const peeringLocation: msRest.OperationQueryParameter = {
- parameterPath: "peeringLocation",
+
+export const peerAsn: OperationParameter = {
+ parameterPath: "peerAsn",
+ mapper: PeerAsnMapper
+};
+
+export const kind1: OperationQueryParameter = {
+ parameterPath: "kind",
mapper: {
+ serializedName: "kind",
required: true,
- serializedName: "peeringLocation",
type: {
name: "String"
}
}
};
-export const peeringName: msRest.OperationURLParameter = {
- parameterPath: "peeringName",
+
+export const directPeeringType: OperationQueryParameter = {
+ parameterPath: ["options", "directPeeringType"],
mapper: {
- required: true,
- serializedName: "peeringName",
+ serializedName: "directPeeringType",
type: {
name: "String"
}
}
};
-export const peeringServiceName: msRest.OperationURLParameter = {
- parameterPath: "peeringServiceName",
+
+export const resourceGroupName: OperationURLParameter = {
+ parameterPath: "resourceGroupName",
mapper: {
+ serializedName: "resourceGroupName",
required: true,
- serializedName: "peeringServiceName",
type: {
name: "String"
}
}
};
-export const prefixName: msRest.OperationURLParameter = {
- parameterPath: "prefixName",
+
+export const peeringName: OperationURLParameter = {
+ parameterPath: "peeringName",
mapper: {
+ serializedName: "peeringName",
required: true,
- serializedName: "prefixName",
type: {
name: "String"
}
}
};
-export const resourceGroupName: msRest.OperationURLParameter = {
- parameterPath: "resourceGroupName",
+
+export const peering: OperationParameter = {
+ parameterPath: "peering",
+ mapper: PeeringMapper
+};
+
+export const tags: OperationParameter = {
+ parameterPath: "tags",
+ mapper: ResourceTagsMapper
+};
+
+export const peeringServiceName: OperationURLParameter = {
+ parameterPath: "peeringServiceName",
mapper: {
+ serializedName: "peeringServiceName",
required: true,
- serializedName: "resourceGroupName",
type: {
name: "String"
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const prefixName: OperationURLParameter = {
+ parameterPath: "prefixName",
mapper: {
+ serializedName: "prefixName",
required: true,
- serializedName: "subscriptionId",
type: {
name: "String"
}
}
};
+
+export const peeringServicePrefix: OperationParameter = {
+ parameterPath: "peeringServicePrefix",
+ mapper: PeeringServicePrefixMapper
+};
+
+export const peeringService: OperationParameter = {
+ parameterPath: "peeringService",
+ mapper: PeeringServiceMapper
+};
diff --git a/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts b/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts
deleted file mode 100644
index da3cdc4561cd..000000000000
--- a/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- PeerAsnListResult,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts b/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts
deleted file mode 100644
index 7e3205ea330a..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationListResult,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts b/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts
deleted file mode 100644
index c41b232f2c04..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServiceLocationListResult,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts b/sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts
deleted file mode 100644
index 3750ca36a206..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts b/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts
deleted file mode 100644
index b9729dc9379f..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringServiceProviderListResult,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts b/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts
deleted file mode 100644
index ddc9ffdfb198..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceListResult,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- ResourceTags,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/peeringsMappers.ts b/sdk/peering/arm-peering/src/models/peeringsMappers.ts
deleted file mode 100644
index 736ac14d0a85..000000000000
--- a/sdk/peering/arm-peering/src/models/peeringsMappers.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringListResult,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- ResourceTags,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/models/prefixesMappers.ts b/sdk/peering/arm-peering/src/models/prefixesMappers.ts
deleted file mode 100644
index 880f11ef7879..000000000000
--- a/sdk/peering/arm-peering/src/models/prefixesMappers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- BaseResource,
- BgpSession,
- ContactInfo,
- DirectConnection,
- DirectPeeringFacility,
- ErrorResponse,
- ExchangeConnection,
- ExchangePeeringFacility,
- PeerAsn,
- Peering,
- PeeringBandwidthOffer,
- PeeringLocation,
- PeeringLocationPropertiesDirect,
- PeeringLocationPropertiesExchange,
- PeeringPropertiesDirect,
- PeeringPropertiesExchange,
- PeeringService,
- PeeringServiceLocation,
- PeeringServicePrefix,
- PeeringServicePrefixListResult,
- PeeringServiceProvider,
- PeeringSku,
- Resource,
- SubResource
-} from "../models/mappers";
diff --git a/sdk/peering/arm-peering/src/operations/index.ts b/sdk/peering/arm-peering/src/operations/index.ts
index 62dc0305012e..4c1d1e87850e 100644
--- a/sdk/peering/arm-peering/src/operations/index.ts
+++ b/sdk/peering/arm-peering/src/operations/index.ts
@@ -1,11 +1,9 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./legacyPeerings";
diff --git a/sdk/peering/arm-peering/src/operations/legacyPeerings.ts b/sdk/peering/arm-peering/src/operations/legacyPeerings.ts
index 552e26a56c06..dd5f01b41a1d 100644
--- a/sdk/peering/arm-peering/src/operations/legacyPeerings.ts
+++ b/sdk/peering/arm-peering/src/operations/legacyPeerings.ts
@@ -1,28 +1,36 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/legacyPeeringsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { LegacyPeerings } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ Peering,
+ Enum1,
+ LegacyPeeringsListNextOptionalParams,
+ LegacyPeeringsListOptionalParams,
+ LegacyPeeringsListResponse,
+ LegacyPeeringsListNextResponse
+} from "../models";
-/** Class representing a LegacyPeerings. */
-export class LegacyPeerings {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing LegacyPeerings operations. */
+export class LegacyPeeringsImpl implements LegacyPeerings {
+ private readonly client: PeeringManagementClient;
/**
- * Create a LegacyPeerings.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class LegacyPeerings class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
@@ -30,81 +38,106 @@ export class LegacyPeerings {
* Lists all of the legacy peerings under the given subscription matching the specified kind and
* location.
* @param peeringLocation The location of the peering.
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param [options] The optional parameters
- * @returns Promise
+ * @param kind The kind of the peering.
+ * @param options The options parameters.
*/
- list(peeringLocation: string, kind: Models.Kind1, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param peeringLocation The location of the peering.
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param callback The callback
- */
- list(peeringLocation: string, kind: Models.Kind1, callback: msRest.ServiceCallback): void;
- /**
- * @param peeringLocation The location of the peering.
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param options The optional parameters
- * @param callback The callback
- */
- list(peeringLocation: string, kind: Models.Kind1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(peeringLocation: string, kind: Models.Kind1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ public list(
+ peeringLocation: string,
+ kind: Enum1,
+ options?: LegacyPeeringsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(peeringLocation, kind, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(peeringLocation, kind, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ peeringLocation: string,
+ kind: Enum1,
+ options?: LegacyPeeringsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(peeringLocation, kind, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(
peeringLocation,
kind,
+ continuationToken,
options
- },
- listOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ peeringLocation: string,
+ kind: Enum1,
+ options?: LegacyPeeringsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(
+ peeringLocation,
+ kind,
+ options
+ )) {
+ yield* page;
+ }
}
/**
* Lists all of the legacy peerings under the given subscription matching the specified kind and
* location.
- * @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
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ peeringLocation: string,
+ kind: Enum1,
+ options?: LegacyPeeringsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { peeringLocation, kind, options },
+ listOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param peeringLocation The location of the peering.
+ * @param kind The kind of the peering.
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ peeringLocation: string,
+ kind: Enum1,
+ nextLink: string,
+ options?: LegacyPeeringsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { peeringLocation, kind, nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.peeringLocation,
- Parameters.kind,
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeeringListResult
@@ -113,19 +146,18 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.peeringLocation,
+ Parameters.kind
+ ],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PeeringListResult
@@ -134,5 +166,16 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.peeringLocation,
+ Parameters.kind
+ ],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/operations.ts b/sdk/peering/arm-peering/src/operations/operations.ts
index ea8c2e65bb8d..a89b18eadc86 100644
--- a/sdk/peering/arm-peering/src/operations/operations.ts
+++ b/sdk/peering/arm-peering/src/operations/operations.ts
@@ -1,95 +1,111 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Operations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ Operation,
+ OperationsListNextOptionalParams,
+ OperationsListOptionalParams,
+ OperationsListResponse,
+ OperationsListNextResponse
+} from "../models";
-/** Class representing a Operations. */
-export class Operations {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing Operations operations. */
+export class OperationsImpl implements Operations {
+ private readonly client: PeeringManagementClient;
/**
- * Create a Operations.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Operations class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
* Lists all of the available API operations for peering resources.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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
+ public list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
}
/**
* Lists all of the available API operations for peering resources.
- * @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
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ options?: OperationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ nextLink: string,
+ options?: OperationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path: "/providers/Microsoft.Peering/operations",
httpMethod: "GET",
- path: "providers/Microsoft.Peering/operations",
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
@@ -98,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
@@ -119,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.nextLink],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peerAsns.ts b/sdk/peering/arm-peering/src/operations/peerAsns.ts
index c07c4c937eee..34bae123b145 100644
--- a/sdk/peering/arm-peering/src/operations/peerAsns.ts
+++ b/sdk/peering/arm-peering/src/operations/peerAsns.ts
@@ -1,57 +1,98 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peerAsnsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PeerAsns } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeerAsn,
+ PeerAsnsListBySubscriptionNextOptionalParams,
+ PeerAsnsListBySubscriptionOptionalParams,
+ PeerAsnsGetOptionalParams,
+ PeerAsnsGetResponse,
+ PeerAsnsCreateOrUpdateOptionalParams,
+ PeerAsnsCreateOrUpdateResponse,
+ PeerAsnsDeleteOptionalParams,
+ PeerAsnsListBySubscriptionResponse,
+ PeerAsnsListBySubscriptionNextResponse
+} from "../models";
-/** Class representing a PeerAsns. */
-export class PeerAsns {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing PeerAsns operations. */
+export class PeerAsnsImpl implements PeerAsns {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeerAsns.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeerAsns class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
- * Gets the peer ASN with the specified name under the given subscription.
- * @param peerAsnName The peer ASN name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(peerAsnName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param peerAsnName The peer ASN name.
- * @param callback The callback
+ * Lists all of the peer ASNs under the given subscription.
+ * @param options The options parameters.
*/
- get(peerAsnName: string, callback: msRest.ServiceCallback): void;
+ public listBySubscription(
+ options?: PeerAsnsListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listBySubscriptionPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listBySubscriptionPagingPage(options);
+ }
+ };
+ }
+
+ private async *listBySubscriptionPagingPage(
+ options?: PeerAsnsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listBySubscription(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listBySubscriptionNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listBySubscriptionPagingAll(
+ options?: PeerAsnsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
+ yield* page;
+ }
+ }
+
/**
+ * Gets the peer ASN with the specified name under the given subscription.
* @param peerAsnName The peer ASN name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(peerAsnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(peerAsnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ peerAsnName: string,
+ options?: PeerAsnsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- peerAsnName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { peerAsnName, options },
+ getOperationSpec
+ );
}
/**
@@ -59,130 +100,69 @@ export class PeerAsns {
* subscription.
* @param peerAsnName The peer ASN name.
* @param peerAsn The peer ASN.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- createOrUpdate(peerAsnName: string, peerAsn: Models.PeerAsn, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param peerAsnName The peer ASN name.
- * @param peerAsn The peer ASN.
- * @param callback The callback
- */
- createOrUpdate(peerAsnName: string, peerAsn: Models.PeerAsn, callback: msRest.ServiceCallback): void;
- /**
- * @param peerAsnName The peer ASN name.
- * @param peerAsn The peer ASN.
- * @param options The optional parameters
- * @param callback The callback
- */
- createOrUpdate(peerAsnName: string, peerAsn: Models.PeerAsn, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(peerAsnName: string, peerAsn: Models.PeerAsn, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ peerAsnName: string,
+ peerAsn: PeerAsn,
+ options?: PeerAsnsCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- peerAsnName,
- peerAsn,
- options
- },
- createOrUpdateOperationSpec,
- callback) as Promise;
+ { peerAsnName, peerAsn, options },
+ createOrUpdateOperationSpec
+ );
}
/**
* Deletes an existing peer ASN with the specified name under the given subscription.
* @param peerAsnName The peer ASN name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(peerAsnName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param peerAsnName The peer ASN name.
- * @param callback The callback
- */
- deleteMethod(peerAsnName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param peerAsnName The peer ASN name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(peerAsnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(peerAsnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ peerAsnName: string,
+ options?: PeerAsnsDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- peerAsnName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { peerAsnName, options },
+ deleteOperationSpec
+ );
}
/**
* Lists all of the peer ASNs under the given subscription.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listBySubscription(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
+ * @param options The options parameters.
*/
- listBySubscription(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listBySubscription(
+ options?: PeerAsnsListBySubscriptionOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- options
- },
- listBySubscriptionOperationSpec,
- callback) as Promise;
+ { options },
+ listBySubscriptionOperationSpec
+ );
}
/**
- * Lists all of the peer ASNs under the given subscription.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
- */
- listBySubscriptionNext(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
+ * ListBySubscriptionNext
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
+ * @param options The options parameters.
*/
- listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listBySubscriptionNext(
+ nextLink: string,
+ options?: PeerAsnsListBySubscriptionNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listBySubscriptionNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listBySubscriptionNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
- urlParameters: [
- Parameters.peerAsnName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeerAsn
@@ -191,29 +171,19 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.peerAsnName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const createOrUpdateOperationSpec: msRest.OperationSpec = {
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
- urlParameters: [
- Parameters.peerAsnName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "peerAsn",
- mapper: {
- ...Mappers.PeerAsn,
- required: true
- }
- },
responses: {
200: {
bodyMapper: Mappers.PeerAsn
@@ -225,22 +195,21 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ requestBody: Parameters.peerAsn,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.peerAsnName
+ ],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
serializer
};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns/{peerAsnName}",
- urlParameters: [
- Parameters.peerAsnName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {},
204: {},
@@ -248,21 +217,18 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.peerAsnName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listBySubscriptionOperationSpec: msRest.OperationSpec = {
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerAsns",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeerAsnListResult
@@ -271,19 +237,14 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PeerAsnListResult
@@ -292,5 +253,12 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peeringLocations.ts b/sdk/peering/arm-peering/src/operations/peeringLocations.ts
index 759ff1c75516..81a796880dbf 100644
--- a/sdk/peering/arm-peering/src/operations/peeringLocations.ts
+++ b/sdk/peering/arm-peering/src/operations/peeringLocations.ts
@@ -1,104 +1,124 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peeringLocationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PeeringLocations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeeringLocation,
+ Enum14,
+ PeeringLocationsListNextOptionalParams,
+ PeeringLocationsListOptionalParams,
+ PeeringLocationsListResponse,
+ PeeringLocationsListNextResponse
+} from "../models";
-/** Class representing a PeeringLocations. */
-export class PeeringLocations {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing PeeringLocations operations. */
+export class PeeringLocationsImpl implements PeeringLocations {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeeringLocations.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeeringLocations class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
* Lists all of the available peering locations for the specified kind of peering.
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param [options] The optional parameters
- * @returns Promise
+ * @param kind The kind of the peering.
+ * @param options The options parameters.
*/
- list(kind: Models.Kind2, options?: Models.PeeringLocationsListOptionalParams): Promise;
- /**
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param callback The callback
- */
- list(kind: Models.Kind2, callback: msRest.ServiceCallback): void;
- /**
- * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange'
- * @param options The optional parameters
- * @param callback The callback
- */
- list(kind: Models.Kind2, options: Models.PeeringLocationsListOptionalParams, callback: msRest.ServiceCallback): void;
- list(kind: Models.Kind2, options?: Models.PeeringLocationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- kind,
- options
+ public list(
+ kind: Enum14,
+ options?: PeeringLocationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(kind, options);
+ return {
+ next() {
+ return iter.next();
},
- listOperationSpec,
- callback) as Promise;
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(kind, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ kind: Enum14,
+ options?: PeeringLocationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(kind, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(kind, continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ kind: Enum14,
+ options?: PeeringLocationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(kind, options)) {
+ yield* page;
+ }
}
/**
* Lists all of the available peering locations for the specified kind of peering.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param kind The kind of the peering.
+ * @param options The options parameters.
*/
- 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;
+ private _list(
+ kind: Enum14,
+ options?: PeeringLocationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { kind, options },
+ listOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param kind The kind of the peering.
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ kind: Enum14,
+ nextLink: string,
+ options?: PeeringLocationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { kind, nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringLocations",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.kind,
- Parameters.directPeeringType,
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeeringLocationListResult
@@ -107,19 +127,18 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.kind1,
+ Parameters.directPeeringType
+ ],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PeeringLocationListResult
@@ -128,5 +147,16 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.kind1,
+ Parameters.directPeeringType
+ ],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts b/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts
index dd0262656860..a54e7004d858 100644
--- a/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts
+++ b/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts
@@ -1,98 +1,112 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peeringServiceLocationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PeeringServiceLocations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeeringServiceLocation,
+ PeeringServiceLocationsListNextOptionalParams,
+ PeeringServiceLocationsListOptionalParams,
+ PeeringServiceLocationsListResponse,
+ PeeringServiceLocationsListNextResponse
+} from "../models";
-/** Class representing a PeeringServiceLocations. */
-export class PeeringServiceLocations {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing PeeringServiceLocations operations. */
+export class PeeringServiceLocationsImpl implements PeeringServiceLocations {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeeringServiceLocations.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeeringServiceLocations class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
* Lists all of the available peering service locations for the specified kind of peering.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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
+ public list(
+ options?: PeeringServiceLocationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: PeeringServiceLocationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: PeeringServiceLocationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
}
/**
* Lists all of the available peering service locations for the specified kind of peering.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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;
+ private _list(
+ options?: PeeringServiceLocationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ nextLink: string,
+ options?: PeeringServiceLocationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceLocations",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceLocations",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeeringServiceLocationListResult
@@ -101,19 +115,14 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PeeringServiceLocationListResult
@@ -122,5 +131,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts b/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts
index be55a7d444d9..261d53436c70 100644
--- a/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts
+++ b/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts
@@ -1,28 +1,34 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peeringServicePrefixesMappers";
+import { PeeringServicePrefixes } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeeringServicePrefixesGetOptionalParams,
+ PeeringServicePrefixesGetResponse,
+ PeeringServicePrefix,
+ PeeringServicePrefixesCreateOrUpdateOptionalParams,
+ PeeringServicePrefixesCreateOrUpdateResponse,
+ PeeringServicePrefixesDeleteOptionalParams
+} from "../models";
-/** Class representing a PeeringServicePrefixes. */
-export class PeeringServicePrefixes {
- private readonly client: PeeringManagementClientContext;
+/** Class containing PeeringServicePrefixes operations. */
+export class PeeringServicePrefixesImpl implements PeeringServicePrefixes {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeeringServicePrefixes.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeeringServicePrefixes class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
@@ -31,35 +37,18 @@ export class PeeringServicePrefixes {
* @param resourceGroupName The resource group name.
* @param peeringServiceName The peering service name.
* @param prefixName The prefix name.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name.
- * @param callback The callback
- */
- get(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name.
- * @param options The optional parameters
- * @param callback The callback
- */
- get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ prefixName: string,
+ options?: PeeringServicePrefixesGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- peeringServiceName,
- prefixName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroupName, peeringServiceName, prefixName, options },
+ getOperationSpec
+ );
}
/**
@@ -68,28 +57,15 @@ export class PeeringServicePrefixes {
* @param peeringServiceName The peering service name.
* @param prefixName The prefix name
* @param peeringServicePrefix The IP prefix for an peering
- * @param [options] The optional parameters
- * @returns Promise
- */
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name
- * @param peeringServicePrefix The IP prefix for an peering
- * @param callback The callback
- */
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name
- * @param peeringServicePrefix The IP prefix for an peering
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ prefixName: string,
+ peeringServicePrefix: PeeringServicePrefix,
+ options?: PeeringServicePrefixesCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
@@ -98,8 +74,8 @@ export class PeeringServicePrefixes {
peeringServicePrefix,
options
},
- createOrUpdateOperationSpec,
- callback) as Promise;
+ createOrUpdateOperationSpec
+ );
}
/**
@@ -107,55 +83,27 @@ export class PeeringServicePrefixes {
* @param resourceGroupName The resource group name.
* @param peeringServiceName The peering service name.
* @param prefixName The prefix name
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The resource group name.
- * @param peeringServiceName The peering service name.
- * @param prefixName The prefix name
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ prefixName: string,
+ options?: PeeringServicePrefixesDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- peeringServiceName,
- prefixName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroupName, peeringServiceName, prefixName, options },
+ deleteOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
- urlParameters: [
- Parameters.resourceGroupName,
- Parameters.peeringServiceName,
- Parameters.prefixName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeeringServicePrefix
@@ -164,31 +112,21 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const createOrUpdateOperationSpec: msRest.OperationSpec = {
- httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.peeringServiceName,
- Parameters.prefixName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
+ Parameters.prefixName
],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "peeringServicePrefix",
- mapper: {
- ...Mappers.PeeringServicePrefix,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
+ httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.PeeringServicePrefix
@@ -200,24 +138,23 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
+ requestBody: Parameters.peeringServicePrefix,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.peeringServiceName,
- Parameters.prefixName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.prefixName
],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}",
+ httpMethod: "DELETE",
responses: {
200: {},
204: {},
@@ -225,5 +162,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.peeringServiceName,
+ Parameters.prefixName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peeringServiceProviders.ts b/sdk/peering/arm-peering/src/operations/peeringServiceProviders.ts
index edbad85b30c6..16222a1f650c 100644
--- a/sdk/peering/arm-peering/src/operations/peeringServiceProviders.ts
+++ b/sdk/peering/arm-peering/src/operations/peeringServiceProviders.ts
@@ -1,98 +1,112 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peeringServiceProvidersMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PeeringServiceProviders } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeeringServiceProvider,
+ PeeringServiceProvidersListNextOptionalParams,
+ PeeringServiceProvidersListOptionalParams,
+ PeeringServiceProvidersListResponse,
+ PeeringServiceProvidersListNextResponse
+} from "../models";
-/** Class representing a PeeringServiceProviders. */
-export class PeeringServiceProviders {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing PeeringServiceProviders operations. */
+export class PeeringServiceProvidersImpl implements PeeringServiceProviders {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeeringServiceProviders.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeeringServiceProviders class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
* Lists all of the available peering service locations for the specified kind of peering.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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
+ public list(
+ options?: PeeringServiceProvidersListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: PeeringServiceProvidersListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: PeeringServiceProvidersListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
}
/**
* Lists all of the available peering service locations for the specified kind of peering.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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;
+ private _list(
+ options?: PeeringServiceProvidersListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ nextLink: string,
+ options?: PeeringServiceProvidersListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceProviders",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceProviders",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.PeeringServiceProviderListResult
@@ -101,19 +115,14 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PeeringServiceProviderListResult
@@ -122,5 +131,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/peering/arm-peering/src/operations/peeringServices.ts b/sdk/peering/arm-peering/src/operations/peeringServices.ts
index 46b91d13e22d..80a327e0a8e5 100644
--- a/sdk/peering/arm-peering/src/operations/peeringServices.ts
+++ b/sdk/peering/arm-peering/src/operations/peeringServices.ts
@@ -1,99 +1,181 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * 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.
+ * 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/peeringServicesMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PeeringServices } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { PeeringManagementClientContext } from "../peeringManagementClientContext";
+import { PeeringManagementClient } from "../peeringManagementClient";
+import {
+ PeeringService,
+ PeeringServicesListByResourceGroupNextOptionalParams,
+ PeeringServicesListByResourceGroupOptionalParams,
+ PeeringServicesListBySubscriptionNextOptionalParams,
+ PeeringServicesListBySubscriptionOptionalParams,
+ PeeringServicesGetOptionalParams,
+ PeeringServicesGetResponse,
+ PeeringServicesCreateOrUpdateOptionalParams,
+ PeeringServicesCreateOrUpdateResponse,
+ PeeringServicesDeleteOptionalParams,
+ ResourceTags,
+ PeeringServicesUpdateOptionalParams,
+ PeeringServicesUpdateResponse,
+ PeeringServicesListByResourceGroupResponse,
+ PeeringServicesListBySubscriptionResponse,
+ PeeringServicesListByResourceGroupNextResponse,
+ PeeringServicesListBySubscriptionNextResponse
+} from "../models";
-/** Class representing a PeeringServices. */
-export class PeeringServices {
- private readonly client: PeeringManagementClientContext;
+///
+/** Class containing PeeringServices operations. */
+export class PeeringServicesImpl implements PeeringServices {
+ private readonly client: PeeringManagementClient;
/**
- * Create a PeeringServices.
- * @param {PeeringManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class PeeringServices class.
+ * @param client Reference to the service client
*/
- constructor(client: PeeringManagementClientContext) {
+ constructor(client: PeeringManagementClient) {
this.client = client;
}
/**
- * Gets an existing peering service with the specified name under the given subscription and
- * resource group.
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering.
- * @param callback The callback
- */
- get(resourceGroupName: string, peeringServiceName: string, callback: msRest.ServiceCallback): void;
- /**
+ * Lists all of the peering services under the given subscription and resource group.
* @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, peeringServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ public listByResourceGroup(
+ resourceGroupName: string,
+ options?: PeeringServicesListByResourceGroupOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
+ }
+ };
+ }
+
+ private async *listByResourceGroupPagingPage(
+ resourceGroupName: string,
+ options?: PeeringServicesListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listByResourceGroup(resourceGroupName, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listByResourceGroupNext(
resourceGroupName,
- peeringServiceName,
+ continuationToken,
options
- },
- getOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listByResourceGroupPagingAll(
+ resourceGroupName: string,
+ options?: PeeringServicesListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listByResourceGroupPagingPage(
+ resourceGroupName,
+ options
+ )) {
+ yield* page;
+ }
}
/**
- * Creates a new peering service or updates an existing peering with the specified name under the
- * given subscription and resource group.
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering service.
- * @param peeringService The properties needed to create or update a peering service.
- * @param [options] The optional parameters
- * @returns Promise
+ * Lists all of the peerings under the given subscription.
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, peeringService: Models.PeeringService, options?: msRest.RequestOptionsBase): Promise;
+ public listBySubscription(
+ options?: PeeringServicesListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listBySubscriptionPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listBySubscriptionPagingPage(options);
+ }
+ };
+ }
+
+ private async *listBySubscriptionPagingPage(
+ options?: PeeringServicesListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listBySubscription(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listBySubscriptionNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listBySubscriptionPagingAll(
+ options?: PeeringServicesListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
+ yield* page;
+ }
+ }
+
/**
+ * Gets an existing peering service with the specified name under the given subscription and resource
+ * group.
* @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering service.
- * @param peeringService The properties needed to create or update a peering service.
- * @param callback The callback
+ * @param peeringServiceName The name of the peering.
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, peeringService: Models.PeeringService, callback: msRest.ServiceCallback): void;
+ get(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ options?: PeeringServicesGetOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroupName, peeringServiceName, options },
+ getOperationSpec
+ );
+ }
+
/**
+ * Creates a new peering service or updates an existing peering with the specified name under the given
+ * subscription and resource group.
* @param resourceGroupName The name of the resource group.
* @param peeringServiceName The name of the peering service.
* @param peeringService The properties needed to create or update a peering service.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, peeringService: Models.PeeringService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(resourceGroupName: string, peeringServiceName: string, peeringService: Models.PeeringService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ peeringService: PeeringService,
+ options?: PeeringServicesCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- peeringServiceName,
- peeringService,
- options
- },
- createOrUpdateOperationSpec,
- callback) as Promise;
+ { resourceGroupName, peeringServiceName, peeringService, options },
+ createOrUpdateOperationSpec
+ );
}
/**
@@ -101,192 +183,106 @@ export class PeeringServices {
* resource group.
* @param resourceGroupName The name of the resource group.
* @param peeringServiceName The name of the peering service.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering service.
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, peeringServiceName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering service.
- * @param options The optional parameters
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, peeringServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroupName: string,
+ peeringServiceName: string,
+ options?: PeeringServicesDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- peeringServiceName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroupName, peeringServiceName, options },
+ deleteOperationSpec
+ );
}
/**
- * Updates tags for a peering service with the specified name under the given subscription and
- * resource group.
- * @param resourceGroupName The name of the resource group.
- * @param peeringServiceName The name of the peering service.
- * @param [options] The optional parameters
- * @returns Promise
- */
- update(resourceGroupName: string, peeringServiceName: string, options?: Models.PeeringServicesUpdateOptionalParams): Promise