From fa005fa2a2825cb73d65b62b824b38e792efce39 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 29 Mar 2023 06:57:42 +0000 Subject: [PATCH] CodeGen from PR 23297 in Azure/azure-rest-api-specs update typescript.readme in paloa... (#23297) --- common/config/rush/pnpm-lock.yaml | 70 +- rush.json | 5 + .../arm-paloaltonetworksngfw/CHANGELOG.md | 5 + .../arm-paloaltonetworksngfw/LICENSE | 21 + .../arm-paloaltonetworksngfw/README.md | 109 + .../arm-paloaltonetworksngfw/_meta.json | 8 + .../api-extractor.json | 31 + .../arm-paloaltonetworksngfw/package.json | 115 + .../review/arm-paloaltonetworksngfw.api.md | 1944 +++++++++ .../arm-paloaltonetworksngfw/rollup.config.js | 122 + .../arm-paloaltonetworksngfw/sample.env | 4 + .../arm-paloaltonetworksngfw/src/index.ts | 13 + .../arm-paloaltonetworksngfw/src/lroImpl.ts | 42 + .../src/models/index.ts | 2567 ++++++++++++ .../src/models/mappers.ts | 3508 +++++++++++++++++ .../src/models/parameters.ts | 337 ++ .../certificateObjectGlobalRulestack.ts | 451 +++ .../certificateObjectLocalRulestack.ts | 503 +++ .../src/operations/firewalls.ts | 797 ++++ .../src/operations/fqdnListGlobalRulestack.ts | 450 +++ .../src/operations/fqdnListLocalRulestack.ts | 502 +++ .../src/operations/globalRulestack.ts | 828 ++++ .../src/operations/index.ts | 21 + .../src/operations/localRules.ts | 637 +++ .../src/operations/localRulestacks.ts | 1129 ++++++ .../src/operations/operations.ts | 149 + .../src/operations/postRules.ts | 571 +++ .../src/operations/preRules.ts | 571 +++ .../operations/prefixListGlobalRulestack.ts | 451 +++ .../operations/prefixListLocalRulestack.ts | 502 +++ .../certificateObjectGlobalRulestack.ts | 97 + .../certificateObjectLocalRulestack.ts | 109 + .../src/operationsInterfaces/firewalls.ts | 172 + .../fqdnListGlobalRulestack.ts | 97 + .../fqdnListLocalRulestack.ts | 109 + .../operationsInterfaces/globalRulestack.ts | 211 + .../src/operationsInterfaces/index.ts | 21 + .../src/operationsInterfaces/localRules.ts | 153 + .../operationsInterfaces/localRulestacks.ts | 266 ++ .../src/operationsInterfaces/operations.ts | 22 + .../src/operationsInterfaces/postRules.ts | 135 + .../src/operationsInterfaces/preRules.ts | 135 + .../prefixListGlobalRulestack.ts | 97 + .../prefixListLocalRulestack.ts | 109 + .../src/pagingHelper.ts | 39 + .../src/paloAltoNetworksCloudngfw.ts | 196 + .../test/sampleTest.ts | 43 + .../arm-paloaltonetworksngfw/tsconfig.json | 27 + sdk/paloaltonetworksngfw/ci.mgmt.yml | 38 + 49 files changed, 18504 insertions(+), 35 deletions(-) create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/CHANGELOG.md create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/LICENSE create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/README.md create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/_meta.json create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/api-extractor.json create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/review/arm-paloaltonetworksngfw.api.md create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/rollup.config.js create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/sample.env create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/index.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/lroImpl.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/index.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/mappers.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/parameters.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/firewalls.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/globalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/index.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRulestacks.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/operations.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/postRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/preRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/firewalls.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/globalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/index.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRulestacks.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/operations.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/postRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/preRules.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListGlobalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListLocalRulestack.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/pagingHelper.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/paloAltoNetworksCloudngfw.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/test/sampleTest.ts create mode 100644 sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/tsconfig.json create mode 100644 sdk/paloaltonetworksngfw/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 84d91e0ecae0..5e190f9c70b8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -150,6 +150,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-paloaltonetworksngfw': file:./projects/arm-paloaltonetworksngfw.tgz '@rush-temp/arm-peering': file:./projects/arm-peering.tgz '@rush-temp/arm-policy': file:./projects/arm-policy.tgz '@rush-temp/arm-policy-profile-2020-09-01-hybrid': file:./projects/arm-policy-profile-2020-09-01-hybrid.tgz @@ -486,6 +487,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-paloaltonetworksngfw': file:projects/arm-paloaltonetworksngfw.tgz '@rush-temp/arm-peering': file:projects/arm-peering.tgz '@rush-temp/arm-policy': file:projects/arm-policy.tgz '@rush-temp/arm-policy-profile-2020-09-01-hybrid': file:projects/arm-policy-profile-2020-09-01-hybrid.tgz @@ -734,6 +736,7 @@ packages: /@azure/ai-form-recognizer/3.1.0-beta.3: resolution: {integrity: sha512-+4QtFKNyxAmdqpcYjuAtmWKm/MuOe9kZsbpS9jA9h0YHzngNj5gc67AA4egV9BXOq9x+1phjYTNC/rxiOUr1uQ==} engines: {node: '>=8.0.0'} + deprecated: Please migrate to a supported (non-beta) version of this package dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 1.2.6 @@ -4035,7 +4038,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230327 + typescript: 5.1.0-dev.20230328 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8677,37 +8680,6 @@ packages: hasBin: true dev: false - /ts-node/10.9.1_cda5npvz5vidcibznbsxxfupne: - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 14.18.41 - acorn: 8.8.2 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.0.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: false - /ts-node/10.9.1_ksn4eycaeggbrckn3ykh37hwf4: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -8913,8 +8885,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230327: - resolution: {integrity: sha512-tzeS6vmUF8qC4zFdvos88Oer1oNVrg0CVlIaxfI//pDrq8rur4nIUTLRWRlEMCeLQporHhD+z9sESoSr5GL+lw==} + /typescript/5.1.0-dev.20230328: + resolution: {integrity: sha512-pylwLhhCSsZX72UUJTSD+5DKoEUUKsqQg6w4bLdRVbYVXDCxPLExUayWWCaRSmx9WJjf00YwMA2MXS2z2t5+2g==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -13829,6 +13801,34 @@ packages: - supports-color dev: false + file:projects/arm-paloaltonetworksngfw.tgz: + resolution: {integrity: sha512-96L+yETa/gHNRR/AsppnHYVztMymcTsIF+8YKi/FJS0VvZFlyKrtY+ZqrHr+Tuh4QM1yVNvtP/IV8jGnZeOXnw==, tarball: file:projects/arm-paloaltonetworksngfw.tgz} + name: '@rush-temp/arm-paloaltonetworksngfw' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.34.4_@types+node@14.18.41 + '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 + '@rollup/plugin-json': 6.0.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.4 + '@types/node': 14.18.41 + chai: 4.3.7 + cross-env: 7.0.3 + dotenv: 16.0.3 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3_qg36w4uagpty5et2swcu4ykn64 + tslib: 2.5.0 + typescript: 4.8.4 + uglify-js: 3.17.4 + transitivePeerDependencies: + - supports-color + dev: false + file:projects/arm-peering.tgz: resolution: {integrity: sha512-kwmgarSgeIlNMuAblgCSksZgPk7RPEnQ9Z7WPXVbEBL4UKRQ9EtwUN101uW8B03dqZ6XVntT8Mzuqd0roCOyjw==, tarball: file:projects/arm-peering.tgz} name: '@rush-temp/arm-peering' @@ -17018,7 +17018,7 @@ packages: rollup-plugin-sourcemaps: 0.6.3_qg36w4uagpty5et2swcu4ykn64 rollup-plugin-visualizer: 5.9.0_rollup@2.79.1 semver: 7.3.8 - ts-node: 10.9.1_cda5npvz5vidcibznbsxxfupne + ts-node: 10.9.1_rwcdhhaqkims6irrp2ypnntvry tslib: 2.5.0 typescript: 4.8.4 yaml: 1.10.2 diff --git a/rush.json b/rush.json index 2a9463ae25db..3a4590f88843 100644 --- a/rush.json +++ b/rush.json @@ -1957,6 +1957,11 @@ "packageName": "@azure/arm-newrelicobservability", "projectFolder": "sdk/newrelicobservability/arm-newrelicobservability", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-paloaltonetworksngfw", + "projectFolder": "sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/CHANGELOG.md b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/CHANGELOG.md new file mode 100644 index 000000000000..2bfdb75c2e32 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-03-29) + +The package of @azure/arm-paloaltonetworksngfw is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/LICENSE b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/LICENSE new file mode 100644 index 000000000000..3a1d9b6f24f7 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/README.md b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/README.md new file mode 100644 index 000000000000..5317eb4ba794 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/README.md @@ -0,0 +1,109 @@ +# Azure PaloAltoNetworksCloudngfw client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure PaloAltoNetworksCloudngfw client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-paloaltonetworksngfw) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-paloaltonetworksngfw?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-paloaltonetworksngfw` package + +Install the Azure PaloAltoNetworksCloudngfw client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-paloaltonetworksngfw +``` + +### Create and authenticate a `PaloAltoNetworksCloudngfw` + +To create a client object to access the Azure PaloAltoNetworksCloudngfw API, you will need the `endpoint` of your Azure PaloAltoNetworksCloudngfw resource and a `credential`. The Azure PaloAltoNetworksCloudngfw client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure PaloAltoNetworksCloudngfw resource in the [Azure Portal][azure_portal]. + +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: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure PaloAltoNetworksCloudngfw** 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 { PaloAltoNetworksCloudngfw } = require("@azure/arm-paloaltonetworksngfw"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new PaloAltoNetworksCloudngfw(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new PaloAltoNetworksCloudngfw(credential, subscriptionId); +``` + + +### 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). + +## Key concepts + +### PaloAltoNetworksCloudngfw + +`PaloAltoNetworksCloudngfw` is the primary interface for developers using the Azure PaloAltoNetworksCloudngfw client library. Explore the methods on this client object to understand the different features of the Azure PaloAltoNetworksCloudngfw 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) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpaloaltonetworksngfw%2Farm-paloaltonetworksngfw%2FREADME.png) + +[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/paloaltonetworksngfw/arm-paloaltonetworksngfw/_meta.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/_meta.json new file mode 100644 index 000000000000..46275d724499 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "0f7cb051d05db783cfbaa50c864594a9d50e6f91", + "readme": "specification/paloaltonetworks/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/paloaltonetworks/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" +} \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/api-extractor.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/api-extractor.json new file mode 100644 index 000000000000..818985b40a3c --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$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-paloaltonetworksngfw.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json new file mode 100644 index 000000000000..0647dc771841 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/package.json @@ -0,0 +1,115 @@ +{ + "name": "@azure/arm-paloaltonetworksngfw", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for PaloAltoNetworksCloudngfw.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=14.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.8.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-paloaltonetworksngfw.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~4.8.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "dotenv": "^16.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^14.0.0", + "@azure/dev-tool": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "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", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "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": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/paloAltoNetworksCloudngfw.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw" +} \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/review/arm-paloaltonetworksngfw.api.md b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/review/arm-paloaltonetworksngfw.api.md new file mode 100644 index 000000000000..4827ce669529 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/review/arm-paloaltonetworksngfw.api.md @@ -0,0 +1,1944 @@ +## API Report File for "@azure/arm-paloaltonetworksngfw" + +> 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 { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type ActionEnum = string; + +// @public +export type ActionType = string; + +// @public +export interface AdvSecurityObjectListResponse { + nextLink?: string; + value: AdvSecurityObjectModel; +} + +// @public +export interface AdvSecurityObjectModel { + entry: NameDescriptionObject[]; + type?: string; +} + +// @public +export type AdvSecurityObjectTypeEnum = string; + +// @public +export interface ApplicationInsights { + id?: string; + key?: string; +} + +// @public +export interface AppSeenData { + appSeenList: AppSeenInfo[]; + count: number; +} + +// @public +export interface AppSeenInfo { + category: string; + risk: string; + standardPorts: string; + subCategory: string; + tag: string; + technology: string; + title: string; +} + +// @public +export interface AzureResourceManagerManagedIdentityProperties { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedIdentityType; + userAssignedIdentities?: { + [propertyName: string]: AzureResourceManagerUserAssignedIdentity; + }; +} + +// @public +export interface AzureResourceManagerUserAssignedIdentity { + clientId?: string; + principalId?: string; +} + +// @public +export type BillingCycle = string; + +// @public +export type BooleanEnum = string; + +// @public +export interface Category { + feeds: string[]; + urlCustom: string[]; +} + +// @public +export interface CertificateObjectGlobalRulestack { + beginCreateOrUpdate(globalRulestackName: string, name: string, resource: CertificateObjectGlobalRulestackResource, options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams): Promise, CertificateObjectGlobalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, name: string, resource: CertificateObjectGlobalRulestackResource, options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, name: string, options?: CertificateObjectGlobalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, name: string, options?: CertificateObjectGlobalRulestackDeleteOptionalParams): Promise; + get(globalRulestackName: string, name: string, options?: CertificateObjectGlobalRulestackGetOptionalParams): Promise; + list(globalRulestackName: string, options?: CertificateObjectGlobalRulestackListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CertificateObjectGlobalRulestackCreateOrUpdateResponse = CertificateObjectGlobalRulestackResource; + +// @public +export interface CertificateObjectGlobalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CertificateObjectGlobalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectGlobalRulestackGetResponse = CertificateObjectGlobalRulestackResource; + +// @public +export interface CertificateObjectGlobalRulestackListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectGlobalRulestackListNextResponse = CertificateObjectGlobalRulestackResourceListResult; + +// @public +export interface CertificateObjectGlobalRulestackListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectGlobalRulestackListResponse = CertificateObjectGlobalRulestackResourceListResult; + +// @public +export interface CertificateObjectGlobalRulestackResource extends ProxyResource { + auditComment?: string; + certificateSelfSigned: BooleanEnum; + certificateSignerResourceId?: string; + description?: string; + etag?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface CertificateObjectGlobalRulestackResourceListResult { + nextLink?: string; + value: CertificateObjectGlobalRulestackResource[]; +} + +// @public +export interface CertificateObjectLocalRulestack { + beginCreateOrUpdate(resourceGroupName: string, localRulestackName: string, name: string, resource: CertificateObjectLocalRulestackResource, options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams): Promise, CertificateObjectLocalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, localRulestackName: string, name: string, resource: CertificateObjectLocalRulestackResource, options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, localRulestackName: string, name: string, options?: CertificateObjectLocalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, localRulestackName: string, name: string, options?: CertificateObjectLocalRulestackDeleteOptionalParams): Promise; + get(resourceGroupName: string, localRulestackName: string, name: string, options?: CertificateObjectLocalRulestackGetOptionalParams): Promise; + listByLocalRulestacks(resourceGroupName: string, localRulestackName: string, options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CertificateObjectLocalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CertificateObjectLocalRulestackCreateOrUpdateResponse = CertificateObjectLocalRulestackResource; + +// @public +export interface CertificateObjectLocalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CertificateObjectLocalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectLocalRulestackGetResponse = CertificateObjectLocalRulestackResource; + +// @public +export interface CertificateObjectLocalRulestackListByLocalRulestacksNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectLocalRulestackListByLocalRulestacksNextResponse = CertificateObjectLocalRulestackResourceListResult; + +// @public +export interface CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CertificateObjectLocalRulestackListByLocalRulestacksResponse = CertificateObjectLocalRulestackResourceListResult; + +// @public +export interface CertificateObjectLocalRulestackResource extends ProxyResource { + auditComment?: string; + certificateSelfSigned: BooleanEnum; + certificateSignerResourceId?: string; + description?: string; + etag?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface CertificateObjectLocalRulestackResourceListResult { + nextLink?: string; + value: CertificateObjectLocalRulestackResource[]; +} + +// @public +export interface Changelog { + changes: string[]; + lastCommitted?: Date; + lastModified?: Date; +} + +// @public +export interface CountriesResponse { + nextLink?: string; + value: Country[]; +} + +// @public +export interface Country { + code: string; + description?: string; +} + +// @public +export type CreatedByType = string; + +// @public +export type DecryptionRuleTypeEnum = string; + +// @public +export type DefaultMode = string; + +// @public +export interface DestinationAddr { + cidrs?: string[]; + countries?: string[]; + feeds?: string[]; + fqdnLists?: string[]; + prefixLists?: string[]; +} + +// @public +export type DNSProxy = string; + +// @public +export interface DNSSettings { + dnsServers?: IPAddress[]; + enabledDnsType?: EnabledDNSType; + enableDnsProxy?: DNSProxy; +} + +// @public +export type EgressNat = string; + +// @public +export type EnabledDNSType = string; + +// @public +export interface EndpointConfiguration { + address: IPAddress; + port: string; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface EventHub { + id?: string; + name?: string; + nameSpace?: string; + policyName?: string; + subscriptionId?: string; +} + +// @public +export interface FirewallResource extends TrackedResource { + associatedRulestack?: RulestackDetails; + dnsSettings: DNSSettings; + frontEndSettings?: FrontendSetting[]; + identity?: AzureResourceManagerManagedIdentityProperties; + isPanoramaManaged?: BooleanEnum; + marketplaceDetails: MarketplaceDetails; + networkProfile: NetworkProfile; + panEtag?: string; + panoramaConfig?: PanoramaConfig; + planData: PlanData; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface FirewallResourceListResult { + nextLink?: string; + value: FirewallResource[]; +} + +// @public +export interface FirewallResourceUpdate { + identity?: AzureResourceManagerManagedIdentityProperties; + properties?: FirewallResourceUpdateProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface FirewallResourceUpdateProperties { + associatedRulestack?: RulestackDetails; + dnsSettings?: DNSSettings; + frontEndSettings?: FrontendSetting[]; + isPanoramaManaged?: BooleanEnum; + marketplaceDetails?: MarketplaceDetails; + networkProfile?: NetworkProfile; + panEtag?: string; + panoramaConfig?: PanoramaConfig; + planData?: PlanData; +} + +// @public +export interface Firewalls { + beginCreateOrUpdate(resourceGroupName: string, firewallName: string, resource: FirewallResource, options?: FirewallsCreateOrUpdateOptionalParams): Promise, FirewallsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, firewallName: string, resource: FirewallResource, options?: FirewallsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, firewallName: string, options?: FirewallsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, firewallName: string, options?: FirewallsDeleteOptionalParams): Promise; + get(resourceGroupName: string, firewallName: string, options?: FirewallsGetOptionalParams): Promise; + getGlobalRulestack(resourceGroupName: string, firewallName: string, options?: FirewallsGetGlobalRulestackOptionalParams): Promise; + getLogProfile(resourceGroupName: string, firewallName: string, options?: FirewallsGetLogProfileOptionalParams): Promise; + getSupportInfo(resourceGroupName: string, firewallName: string, options?: FirewallsGetSupportInfoOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: FirewallsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: FirewallsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + saveLogProfile(resourceGroupName: string, firewallName: string, options?: FirewallsSaveLogProfileOptionalParams): Promise; + update(resourceGroupName: string, firewallName: string, properties: FirewallResourceUpdate, options?: FirewallsUpdateOptionalParams): Promise; +} + +// @public +export interface FirewallsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FirewallsCreateOrUpdateResponse = FirewallResource; + +// @public +export interface FirewallsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FirewallsGetGlobalRulestackOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsGetGlobalRulestackResponse = GlobalRulestackInfo; + +// @public +export interface FirewallsGetLogProfileOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsGetLogProfileResponse = LogSettings; + +// @public +export interface FirewallsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsGetResponse = FirewallResource; + +// @public +export interface FirewallsGetSupportInfoOptionalParams extends coreClient.OperationOptions { + email?: string; +} + +// @public +export type FirewallsGetSupportInfoResponse = SupportInfo; + +// @public +export interface FirewallsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsListByResourceGroupNextResponse = FirewallResourceListResult; + +// @public +export interface FirewallsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsListByResourceGroupResponse = FirewallResourceListResult; + +// @public +export interface FirewallsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsListBySubscriptionNextResponse = FirewallResourceListResult; + +// @public +export interface FirewallsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsListBySubscriptionResponse = FirewallResourceListResult; + +// @public +export interface FirewallsSaveLogProfileOptionalParams extends coreClient.OperationOptions { + logSettings?: LogSettings; +} + +// @public +export interface FirewallsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirewallsUpdateResponse = FirewallResource; + +// @public +export interface FqdnListGlobalRulestack { + beginCreateOrUpdate(globalRulestackName: string, name: string, resource: FqdnListGlobalRulestackResource, options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams): Promise, FqdnListGlobalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, name: string, resource: FqdnListGlobalRulestackResource, options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, name: string, options?: FqdnListGlobalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, name: string, options?: FqdnListGlobalRulestackDeleteOptionalParams): Promise; + get(globalRulestackName: string, name: string, options?: FqdnListGlobalRulestackGetOptionalParams): Promise; + list(globalRulestackName: string, options?: FqdnListGlobalRulestackListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FqdnListGlobalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FqdnListGlobalRulestackCreateOrUpdateResponse = FqdnListGlobalRulestackResource; + +// @public +export interface FqdnListGlobalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FqdnListGlobalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListGlobalRulestackGetResponse = FqdnListGlobalRulestackResource; + +// @public +export interface FqdnListGlobalRulestackListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListGlobalRulestackListNextResponse = FqdnListGlobalRulestackResourceListResult; + +// @public +export interface FqdnListGlobalRulestackListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListGlobalRulestackListResponse = FqdnListGlobalRulestackResourceListResult; + +// @public +export interface FqdnListGlobalRulestackResource extends ProxyResource { + auditComment?: string; + description?: string; + etag?: string; + fqdnList: string[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface FqdnListGlobalRulestackResourceListResult { + nextLink?: string; + value: FqdnListGlobalRulestackResource[]; +} + +// @public +export interface FqdnListLocalRulestack { + beginCreateOrUpdate(resourceGroupName: string, localRulestackName: string, name: string, resource: FqdnListLocalRulestackResource, options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams): Promise, FqdnListLocalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, localRulestackName: string, name: string, resource: FqdnListLocalRulestackResource, options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, localRulestackName: string, name: string, options?: FqdnListLocalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, localRulestackName: string, name: string, options?: FqdnListLocalRulestackDeleteOptionalParams): Promise; + get(resourceGroupName: string, localRulestackName: string, name: string, options?: FqdnListLocalRulestackGetOptionalParams): Promise; + listByLocalRulestacks(resourceGroupName: string, localRulestackName: string, options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FqdnListLocalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FqdnListLocalRulestackCreateOrUpdateResponse = FqdnListLocalRulestackResource; + +// @public +export interface FqdnListLocalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface FqdnListLocalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListLocalRulestackGetResponse = FqdnListLocalRulestackResource; + +// @public +export interface FqdnListLocalRulestackListByLocalRulestacksNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListLocalRulestackListByLocalRulestacksNextResponse = FqdnListLocalRulestackResourceListResult; + +// @public +export interface FqdnListLocalRulestackListByLocalRulestacksOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FqdnListLocalRulestackListByLocalRulestacksResponse = FqdnListLocalRulestackResourceListResult; + +// @public +export interface FqdnListLocalRulestackResource extends ProxyResource { + auditComment?: string; + description?: string; + etag?: string; + fqdnList: string[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface FqdnListLocalRulestackResourceListResult { + nextLink?: string; + value: FqdnListLocalRulestackResource[]; +} + +// @public +export interface FrontendSetting { + backendConfiguration: EndpointConfiguration; + frontendConfiguration: EndpointConfiguration; + name: string; + protocol: ProtocolType; +} + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface GlobalRulestack { + beginCommit(globalRulestackName: string, options?: GlobalRulestackCommitOptionalParams): Promise, void>>; + beginCommitAndWait(globalRulestackName: string, options?: GlobalRulestackCommitOptionalParams): Promise; + beginCreateOrUpdate(globalRulestackName: string, resource: GlobalRulestackResource, options?: GlobalRulestackCreateOrUpdateOptionalParams): Promise, GlobalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, resource: GlobalRulestackResource, options?: GlobalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, options?: GlobalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, options?: GlobalRulestackDeleteOptionalParams): Promise; + get(globalRulestackName: string, options?: GlobalRulestackGetOptionalParams): Promise; + getChangeLog(globalRulestackName: string, options?: GlobalRulestackGetChangeLogOptionalParams): Promise; + list(options?: GlobalRulestackListOptionalParams): PagedAsyncIterableIterator; + listAdvancedSecurityObjects(globalRulestackName: string, typeParam: AdvSecurityObjectTypeEnum, options?: GlobalRulestackListAdvancedSecurityObjectsOptionalParams): Promise; + listAppIds(globalRulestackName: string, options?: GlobalRulestackListAppIdsOptionalParams): Promise; + listCountries(globalRulestackName: string, options?: GlobalRulestackListCountriesOptionalParams): Promise; + listFirewalls(globalRulestackName: string, options?: GlobalRulestackListFirewallsOptionalParams): Promise; + listPredefinedUrlCategories(globalRulestackName: string, options?: GlobalRulestackListPredefinedUrlCategoriesOptionalParams): Promise; + listSecurityServices(globalRulestackName: string, typeParam: SecurityServicesTypeEnum, options?: GlobalRulestackListSecurityServicesOptionalParams): Promise; + revert(globalRulestackName: string, options?: GlobalRulestackRevertOptionalParams): Promise; + update(globalRulestackName: string, properties: GlobalRulestackResourceUpdate, options?: GlobalRulestackUpdateOptionalParams): Promise; +} + +// @public +export interface GlobalRulestackCommitOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GlobalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GlobalRulestackCreateOrUpdateResponse = GlobalRulestackResource; + +// @public +export interface GlobalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GlobalRulestackGetChangeLogOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalRulestackGetChangeLogResponse = Changelog; + +// @public +export interface GlobalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalRulestackGetResponse = GlobalRulestackResource; + +// @public +export interface GlobalRulestackInfo { + azureId: string; +} + +// @public +export interface GlobalRulestackListAdvancedSecurityObjectsOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type GlobalRulestackListAdvancedSecurityObjectsResponse = AdvSecurityObjectListResponse; + +// @public +export interface GlobalRulestackListAppIdsOptionalParams extends coreClient.OperationOptions { + // (undocumented) + appIdVersion?: string; + // (undocumented) + appPrefix?: string; + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type GlobalRulestackListAppIdsResponse = ListAppIdResponse; + +// @public +export interface GlobalRulestackListCountriesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type GlobalRulestackListCountriesResponse = CountriesResponse; + +// @public +export interface GlobalRulestackListFirewallsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalRulestackListFirewallsResponse = ListFirewallsResponse; + +// @public +export interface GlobalRulestackListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalRulestackListNextResponse = GlobalRulestackResourceListResult; + +// @public +export interface GlobalRulestackListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GlobalRulestackListPredefinedUrlCategoriesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type GlobalRulestackListPredefinedUrlCategoriesResponse = PredefinedUrlCategoriesResponse; + +// @public +export type GlobalRulestackListResponse = GlobalRulestackResourceListResult; + +// @public +export interface GlobalRulestackListSecurityServicesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type GlobalRulestackListSecurityServicesResponse = SecurityServicesResponse; + +// @public +export interface GlobalRulestackResource extends ProxyResource { + associatedSubscriptions?: string[]; + defaultMode?: DefaultMode; + description?: string; + identity?: AzureResourceManagerManagedIdentityProperties; + location: string; + minAppIdVersion?: string; + panEtag?: string; + panLocation?: string; + readonly provisioningState?: ProvisioningState; + scope?: ScopeType; + securityServices?: SecurityServices; +} + +// @public +export interface GlobalRulestackResourceListResult { + nextLink?: string; + value: GlobalRulestackResource[]; +} + +// @public +export interface GlobalRulestackResourceUpdate { + identity?: AzureResourceManagerManagedIdentityProperties; + location?: string; + properties?: GlobalRulestackResourceUpdateProperties; +} + +// @public +export interface GlobalRulestackResourceUpdateProperties { + associatedSubscriptions?: string[]; + defaultMode?: DefaultMode; + description?: string; + minAppIdVersion?: string; + panEtag?: string; + panLocation?: string; + scope?: ScopeType; + securityServices?: SecurityServices; +} + +// @public +export interface GlobalRulestackRevertOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface GlobalRulestackUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GlobalRulestackUpdateResponse = GlobalRulestackResource; + +// @public +export interface IPAddress { + address?: string; + resourceId?: string; +} + +// @public +export interface IPAddressSpace { + addressSpace?: string; + resourceId?: string; +} + +// @public +export enum KnownActionEnum { + Allow = "Allow", + DenyResetBoth = "DenyResetBoth", + DenyResetServer = "DenyResetServer", + DenySilent = "DenySilent" +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAdvSecurityObjectTypeEnum { + Feeds = "feeds", + UrlCustom = "urlCustom" +} + +// @public +export enum KnownBillingCycle { + Monthly = "MONTHLY", + Weekly = "WEEKLY" +} + +// @public +export enum KnownBooleanEnum { + False = "FALSE", + True = "TRUE" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownDecryptionRuleTypeEnum { + None = "None", + SSLInboundInspection = "SSLInboundInspection", + SSLOutboundInspection = "SSLOutboundInspection" +} + +// @public +export enum KnownDefaultMode { + Firewall = "FIREWALL", + IPS = "IPS", + None = "NONE" +} + +// @public +export enum KnownDNSProxy { + Disabled = "DISABLED", + Enabled = "ENABLED" +} + +// @public +export enum KnownEgressNat { + Disabled = "DISABLED", + Enabled = "ENABLED" +} + +// @public +export enum KnownEnabledDNSType { + Azure = "AZURE", + Custom = "CUSTOM" +} + +// @public +export enum KnownLogOption { + IndividualDestination = "INDIVIDUAL_DESTINATION", + SameDestination = "SAME_DESTINATION" +} + +// @public +export enum KnownLogType { + Audit = "AUDIT", + Decryption = "DECRYPTION", + DLP = "DLP", + Threat = "THREAT", + Traffic = "TRAFFIC", + Wildfire = "WILDFIRE" +} + +// @public +export enum KnownManagedIdentityType { + None = "None", + SystemAndUserAssigned = "SystemAssigned,UserAssigned", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownMarketplaceSubscriptionStatus { + FulfillmentRequested = "FulfillmentRequested", + NotStarted = "NotStarted", + PendingFulfillmentStart = "PendingFulfillmentStart", + Subscribed = "Subscribed", + Suspended = "Suspended", + Unsubscribed = "Unsubscribed" +} + +// @public +export enum KnownNetworkType { + Vnet = "VNET", + Vwan = "VWAN" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProtocolType { + TCP = "TCP", + UDP = "UDP" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleted = "Deleted", + Deleting = "Deleting", + Failed = "Failed", + NotSpecified = "NotSpecified", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownScopeType { + Global = "GLOBAL", + Local = "LOCAL" +} + +// @public +export enum KnownSecurityServicesTypeEnum { + AntiSpyware = "antiSpyware", + AntiVirus = "antiVirus", + DnsSubscription = "dnsSubscription", + FileBlocking = "fileBlocking", + IpsVulnerability = "ipsVulnerability", + UrlFiltering = "urlFiltering" +} + +// @public +export enum KnownStateEnum { + Disabled = "DISABLED", + Enabled = "ENABLED" +} + +// @public +export enum KnownUsageType { + Committed = "COMMITTED", + Payg = "PAYG" +} + +// @public (undocumented) +export interface ListAppIdResponse { + nextLink?: string; + value: string[]; +} + +// @public +export interface ListFirewallsResponse { + nextLink?: string; + value: string[]; +} + +// @public +export interface LocalRules { + beginCreateOrUpdate(resourceGroupName: string, localRulestackName: string, priority: string, resource: LocalRulesResource, options?: LocalRulesCreateOrUpdateOptionalParams): Promise, LocalRulesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, localRulestackName: string, priority: string, resource: LocalRulesResource, options?: LocalRulesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesGetOptionalParams): Promise; + getCounters(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesGetCountersOptionalParams): Promise; + listByLocalRulestacks(resourceGroupName: string, localRulestackName: string, options?: LocalRulesListByLocalRulestacksOptionalParams): PagedAsyncIterableIterator; + refreshCounters(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesRefreshCountersOptionalParams): Promise; + resetCounters(resourceGroupName: string, localRulestackName: string, priority: string, options?: LocalRulesResetCountersOptionalParams): Promise; +} + +// @public +export interface LocalRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LocalRulesCreateOrUpdateResponse = LocalRulesResource; + +// @public +export interface LocalRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface LocalRulesGetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type LocalRulesGetCountersResponse = RuleCounter; + +// @public +export interface LocalRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulesGetResponse = LocalRulesResource; + +// @public +export interface LocalRulesListByLocalRulestacksNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulesListByLocalRulestacksNextResponse = LocalRulesResourceListResult; + +// @public +export interface LocalRulesListByLocalRulestacksOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulesListByLocalRulestacksResponse = LocalRulesResourceListResult; + +// @public +export interface LocalRulesRefreshCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export interface LocalRulesResetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type LocalRulesResetCountersResponse = RuleCounterReset; + +// @public +export interface LocalRulesResource extends ProxyResource { + actionType?: ActionEnum; + applications?: string[]; + auditComment?: string; + category?: Category; + decryptionRuleType?: DecryptionRuleTypeEnum; + description?: string; + destination?: DestinationAddr; + enableLogging?: StateEnum; + etag?: string; + inboundInspectionCertificate?: string; + negateDestination?: BooleanEnum; + negateSource?: BooleanEnum; + readonly priority?: number; + protocol?: string; + protocolPortList?: string[]; + readonly provisioningState?: ProvisioningState; + ruleName: string; + ruleState?: StateEnum; + source?: SourceAddr; + tags?: TagInfo[]; +} + +// @public +export interface LocalRulesResourceListResult { + nextLink?: string; + value: LocalRulesResource[]; +} + +// @public +export interface LocalRulestackResource extends TrackedResource { + associatedSubscriptions?: string[]; + defaultMode?: DefaultMode; + description?: string; + identity?: AzureResourceManagerManagedIdentityProperties; + minAppIdVersion?: string; + panEtag?: string; + panLocation?: string; + readonly provisioningState?: ProvisioningState; + scope?: ScopeType; + securityServices?: SecurityServices; +} + +// @public +export interface LocalRulestackResourceListResult { + nextLink?: string; + value: LocalRulestackResource[]; +} + +// @public +export interface LocalRulestackResourceUpdate { + identity?: AzureResourceManagerManagedIdentityProperties; + properties?: LocalRulestackResourceUpdateProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface LocalRulestackResourceUpdateProperties { + associatedSubscriptions?: string[]; + defaultMode?: DefaultMode; + description?: string; + minAppIdVersion?: string; + panEtag?: string; + panLocation?: string; + scope?: ScopeType; + securityServices?: SecurityServices; +} + +// @public +export interface LocalRulestacks { + beginCommit(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksCommitOptionalParams): Promise, void>>; + beginCommitAndWait(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksCommitOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, localRulestackName: string, resource: LocalRulestackResource, options?: LocalRulestacksCreateOrUpdateOptionalParams): Promise, LocalRulestacksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, localRulestackName: string, resource: LocalRulestackResource, options?: LocalRulestacksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksDeleteOptionalParams): Promise; + get(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksGetOptionalParams): Promise; + getChangeLog(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksGetChangeLogOptionalParams): Promise; + getSupportInfo(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksGetSupportInfoOptionalParams): Promise; + listAdvancedSecurityObjects(resourceGroupName: string, localRulestackName: string, typeParam: AdvSecurityObjectTypeEnum, options?: LocalRulestacksListAdvancedSecurityObjectsOptionalParams): Promise; + listAppIds(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksListAppIdsOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: LocalRulestacksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: LocalRulestacksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listCountries(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksListCountriesOptionalParams): Promise; + listFirewalls(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksListFirewallsOptionalParams): Promise; + listPredefinedUrlCategories(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksListPredefinedUrlCategoriesOptionalParams): Promise; + listSecurityServices(resourceGroupName: string, localRulestackName: string, typeParam: SecurityServicesTypeEnum, options?: LocalRulestacksListSecurityServicesOptionalParams): Promise; + revert(resourceGroupName: string, localRulestackName: string, options?: LocalRulestacksRevertOptionalParams): Promise; + update(resourceGroupName: string, localRulestackName: string, properties: LocalRulestackResourceUpdate, options?: LocalRulestacksUpdateOptionalParams): Promise; +} + +// @public +export interface LocalRulestacksCommitOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface LocalRulestacksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LocalRulestacksCreateOrUpdateResponse = LocalRulestackResource; + +// @public +export interface LocalRulestacksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface LocalRulestacksGetChangeLogOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksGetChangeLogResponse = Changelog; + +// @public +export interface LocalRulestacksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksGetResponse = LocalRulestackResource; + +// @public +export interface LocalRulestacksGetSupportInfoOptionalParams extends coreClient.OperationOptions { + email?: string; +} + +// @public +export type LocalRulestacksGetSupportInfoResponse = SupportInfo; + +// @public +export interface LocalRulestacksListAdvancedSecurityObjectsOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type LocalRulestacksListAdvancedSecurityObjectsResponse = AdvSecurityObjectListResponse; + +// @public +export interface LocalRulestacksListAppIdsOptionalParams extends coreClient.OperationOptions { + // (undocumented) + appIdVersion?: string; + // (undocumented) + appPrefix?: string; + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type LocalRulestacksListAppIdsResponse = ListAppIdResponse; + +// @public +export interface LocalRulestacksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksListByResourceGroupNextResponse = LocalRulestackResourceListResult; + +// @public +export interface LocalRulestacksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksListByResourceGroupResponse = LocalRulestackResourceListResult; + +// @public +export interface LocalRulestacksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksListBySubscriptionNextResponse = LocalRulestackResourceListResult; + +// @public +export interface LocalRulestacksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksListBySubscriptionResponse = LocalRulestackResourceListResult; + +// @public +export interface LocalRulestacksListCountriesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type LocalRulestacksListCountriesResponse = CountriesResponse; + +// @public +export interface LocalRulestacksListFirewallsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksListFirewallsResponse = ListFirewallsResponse; + +// @public +export interface LocalRulestacksListPredefinedUrlCategoriesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type LocalRulestacksListPredefinedUrlCategoriesResponse = PredefinedUrlCategoriesResponse; + +// @public +export interface LocalRulestacksListSecurityServicesOptionalParams extends coreClient.OperationOptions { + // (undocumented) + skip?: string; + // (undocumented) + top?: number; +} + +// @public +export type LocalRulestacksListSecurityServicesResponse = SecurityServicesResponse; + +// @public +export interface LocalRulestacksRevertOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface LocalRulestacksUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocalRulestacksUpdateResponse = LocalRulestackResource; + +// @public +export interface LogDestination { + eventHubConfigurations?: EventHub; + monitorConfigurations?: MonitorLog; + storageConfigurations?: StorageAccount; +} + +// @public +export type LogOption = string; + +// @public +export interface LogSettings { + applicationInsights?: ApplicationInsights; + commonDestination?: LogDestination; + decryptLogDestination?: LogDestination; + logOption?: LogOption; + logType?: LogType; + threatLogDestination?: LogDestination; + trafficLogDestination?: LogDestination; +} + +// @public +export type LogType = string; + +// @public +export type ManagedIdentityType = string; + +// @public +export interface MarketplaceDetails { + readonly marketplaceSubscriptionId?: string; + marketplaceSubscriptionStatus?: MarketplaceSubscriptionStatus; + offerId: string; + publisherId: string; +} + +// @public +export type MarketplaceSubscriptionStatus = string; + +// @public +export interface MonitorLog { + id?: string; + primaryKey?: string; + secondaryKey?: string; + subscriptionId?: string; + workspace?: string; +} + +// @public +export interface NameDescriptionObject { + description?: string; + name: string; +} + +// @public +export interface NetworkProfile { + egressNatIp?: IPAddress[]; + enableEgressNat: EgressNat; + networkType: NetworkType; + publicIps: IPAddress[]; + vnetConfiguration?: VnetConfiguration; + vwanConfiguration?: VwanConfiguration; +} + +// @public +export type NetworkType = string; + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly 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 Origin = string; + +// @public (undocumented) +export class PaloAltoNetworksCloudngfw extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PaloAltoNetworksCloudngfwOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + certificateObjectGlobalRulestack: CertificateObjectGlobalRulestack; + // (undocumented) + certificateObjectLocalRulestack: CertificateObjectLocalRulestack; + // (undocumented) + firewalls: Firewalls; + // (undocumented) + fqdnListGlobalRulestack: FqdnListGlobalRulestack; + // (undocumented) + fqdnListLocalRulestack: FqdnListLocalRulestack; + // (undocumented) + globalRulestack: GlobalRulestack; + // (undocumented) + localRules: LocalRules; + // (undocumented) + localRulestacks: LocalRulestacks; + // (undocumented) + operations: Operations; + // (undocumented) + postRules: PostRules; + // (undocumented) + prefixListGlobalRulestack: PrefixListGlobalRulestack; + // (undocumented) + prefixListLocalRulestack: PrefixListLocalRulestack; + // (undocumented) + preRules: PreRules; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface PaloAltoNetworksCloudngfwOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface PanoramaConfig { + readonly cgName?: string; + configString: string; + readonly dgName?: string; + readonly hostName?: string; + readonly panoramaServer?: string; + readonly panoramaServer2?: string; + readonly tplName?: string; + readonly vmAuthKey?: string; +} + +// @public +export interface PlanData { + billingCycle: BillingCycle; + readonly effectiveDate?: Date; + planId: string; + usageType?: UsageType; +} + +// @public +export interface PostRules { + beginCreateOrUpdate(globalRulestackName: string, priority: string, resource: PostRulesResource, options?: PostRulesCreateOrUpdateOptionalParams): Promise, PostRulesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, priority: string, resource: PostRulesResource, options?: PostRulesCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, priority: string, options?: PostRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, priority: string, options?: PostRulesDeleteOptionalParams): Promise; + get(globalRulestackName: string, priority: string, options?: PostRulesGetOptionalParams): Promise; + getCounters(globalRulestackName: string, priority: string, options?: PostRulesGetCountersOptionalParams): Promise; + list(globalRulestackName: string, options?: PostRulesListOptionalParams): PagedAsyncIterableIterator; + refreshCounters(globalRulestackName: string, priority: string, options?: PostRulesRefreshCountersOptionalParams): Promise; + resetCounters(globalRulestackName: string, priority: string, options?: PostRulesResetCountersOptionalParams): Promise; +} + +// @public +export interface PostRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PostRulesCreateOrUpdateResponse = PostRulesResource; + +// @public +export interface PostRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PostRulesGetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type PostRulesGetCountersResponse = RuleCounter; + +// @public +export interface PostRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PostRulesGetResponse = PostRulesResource; + +// @public +export interface PostRulesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PostRulesListNextResponse = PostRulesResourceListResult; + +// @public +export interface PostRulesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PostRulesListResponse = PostRulesResourceListResult; + +// @public +export interface PostRulesRefreshCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export interface PostRulesResetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type PostRulesResetCountersResponse = RuleCounterReset; + +// @public +export interface PostRulesResource extends ProxyResource { + actionType?: ActionEnum; + applications?: string[]; + auditComment?: string; + category?: Category; + decryptionRuleType?: DecryptionRuleTypeEnum; + description?: string; + destination?: DestinationAddr; + enableLogging?: StateEnum; + etag?: string; + inboundInspectionCertificate?: string; + negateDestination?: BooleanEnum; + negateSource?: BooleanEnum; + readonly priority?: number; + protocol?: string; + protocolPortList?: string[]; + readonly provisioningState?: ProvisioningState; + ruleName: string; + ruleState?: StateEnum; + source?: SourceAddr; + tags?: TagInfo[]; +} + +// @public +export interface PostRulesResourceListResult { + nextLink?: string; + value: PostRulesResource[]; +} + +// @public +export interface PredefinedUrlCategoriesResponse { + nextLink?: string; + value: PredefinedUrlCategory[]; +} + +// @public +export interface PredefinedUrlCategory { + // (undocumented) + action: string; + // (undocumented) + name: string; +} + +// @public +export interface PrefixListGlobalRulestack { + beginCreateOrUpdate(globalRulestackName: string, name: string, resource: PrefixListGlobalRulestackResource, options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams): Promise, PrefixListGlobalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, name: string, resource: PrefixListGlobalRulestackResource, options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, name: string, options?: PrefixListGlobalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, name: string, options?: PrefixListGlobalRulestackDeleteOptionalParams): Promise; + get(globalRulestackName: string, name: string, options?: PrefixListGlobalRulestackGetOptionalParams): Promise; + list(globalRulestackName: string, options?: PrefixListGlobalRulestackListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrefixListGlobalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrefixListGlobalRulestackCreateOrUpdateResponse = PrefixListGlobalRulestackResource; + +// @public +export interface PrefixListGlobalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrefixListGlobalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListGlobalRulestackGetResponse = PrefixListGlobalRulestackResource; + +// @public +export interface PrefixListGlobalRulestackListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListGlobalRulestackListNextResponse = PrefixListGlobalRulestackResourceListResult; + +// @public +export interface PrefixListGlobalRulestackListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListGlobalRulestackListResponse = PrefixListGlobalRulestackResourceListResult; + +// @public +export interface PrefixListGlobalRulestackResource extends ProxyResource { + auditComment?: string; + description?: string; + etag?: string; + prefixList: string[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface PrefixListGlobalRulestackResourceListResult { + nextLink?: string; + value: PrefixListGlobalRulestackResource[]; +} + +// @public +export interface PrefixListLocalRulestack { + beginCreateOrUpdate(resourceGroupName: string, localRulestackName: string, name: string, resource: PrefixListResource, options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams): Promise, PrefixListLocalRulestackCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, localRulestackName: string, name: string, resource: PrefixListResource, options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, localRulestackName: string, name: string, options?: PrefixListLocalRulestackDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, localRulestackName: string, name: string, options?: PrefixListLocalRulestackDeleteOptionalParams): Promise; + get(resourceGroupName: string, localRulestackName: string, name: string, options?: PrefixListLocalRulestackGetOptionalParams): Promise; + listByLocalRulestacks(resourceGroupName: string, localRulestackName: string, options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PrefixListLocalRulestackCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PrefixListLocalRulestackCreateOrUpdateResponse = PrefixListResource; + +// @public +export interface PrefixListLocalRulestackDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PrefixListLocalRulestackGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListLocalRulestackGetResponse = PrefixListResource; + +// @public +export interface PrefixListLocalRulestackListByLocalRulestacksNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListLocalRulestackListByLocalRulestacksNextResponse = PrefixListResourceListResult; + +// @public +export interface PrefixListLocalRulestackListByLocalRulestacksOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PrefixListLocalRulestackListByLocalRulestacksResponse = PrefixListResourceListResult; + +// @public +export interface PrefixListResource extends ProxyResource { + auditComment?: string; + description?: string; + etag?: string; + prefixList: string[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface PrefixListResourceListResult { + nextLink?: string; + value: PrefixListResource[]; +} + +// @public +export interface PreRules { + beginCreateOrUpdate(globalRulestackName: string, priority: string, resource: PreRulesResource, options?: PreRulesCreateOrUpdateOptionalParams): Promise, PreRulesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(globalRulestackName: string, priority: string, resource: PreRulesResource, options?: PreRulesCreateOrUpdateOptionalParams): Promise; + beginDelete(globalRulestackName: string, priority: string, options?: PreRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(globalRulestackName: string, priority: string, options?: PreRulesDeleteOptionalParams): Promise; + get(globalRulestackName: string, priority: string, options?: PreRulesGetOptionalParams): Promise; + getCounters(globalRulestackName: string, priority: string, options?: PreRulesGetCountersOptionalParams): Promise; + list(globalRulestackName: string, options?: PreRulesListOptionalParams): PagedAsyncIterableIterator; + refreshCounters(globalRulestackName: string, priority: string, options?: PreRulesRefreshCountersOptionalParams): Promise; + resetCounters(globalRulestackName: string, priority: string, options?: PreRulesResetCountersOptionalParams): Promise; +} + +// @public +export interface PreRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PreRulesCreateOrUpdateResponse = PreRulesResource; + +// @public +export interface PreRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PreRulesGetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type PreRulesGetCountersResponse = RuleCounter; + +// @public +export interface PreRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PreRulesGetResponse = PreRulesResource; + +// @public +export interface PreRulesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PreRulesListNextResponse = PreRulesResourceListResult; + +// @public +export interface PreRulesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PreRulesListResponse = PreRulesResourceListResult; + +// @public +export interface PreRulesRefreshCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export interface PreRulesResetCountersOptionalParams extends coreClient.OperationOptions { + // (undocumented) + firewallName?: string; +} + +// @public +export type PreRulesResetCountersResponse = RuleCounterReset; + +// @public +export interface PreRulesResource extends ProxyResource { + actionType?: ActionEnum; + applications?: string[]; + auditComment?: string; + category?: Category; + decryptionRuleType?: DecryptionRuleTypeEnum; + description?: string; + destination?: DestinationAddr; + enableLogging?: StateEnum; + etag?: string; + inboundInspectionCertificate?: string; + negateDestination?: BooleanEnum; + negateSource?: BooleanEnum; + readonly priority?: number; + protocol?: string; + protocolPortList?: string[]; + readonly provisioningState?: ProvisioningState; + ruleName: string; + ruleState?: StateEnum; + source?: SourceAddr; + tags?: TagInfo[]; +} + +// @public +export interface PreRulesResourceListResult { + nextLink?: string; + value: PreRulesResource[]; +} + +// @public +export type ProtocolType = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface RuleCounter { + appSeen?: AppSeenData; + firewallName?: string; + hitCount?: number; + lastUpdatedTimestamp?: Date; + priority: string; + requestTimestamp?: Date; + ruleListName?: string; + ruleName: string; + ruleStackName?: string; + timestamp?: Date; +} + +// @public +export interface RuleCounterReset { + firewallName?: string; + readonly priority?: string; + ruleListName?: string; + ruleName?: string; + ruleStackName?: string; +} + +// @public +export interface RulestackDetails { + location?: string; + resourceId?: string; + rulestackId?: string; +} + +// @public +export type ScopeType = string; + +// @public +export interface SecurityServices { + antiSpywareProfile?: string; + antiVirusProfile?: string; + dnsSubscription?: string; + fileBlockingProfile?: string; + outboundTrustCertificate?: string; + outboundUnTrustCertificate?: string; + urlFilteringProfile?: string; + vulnerabilityProfile?: string; +} + +// @public +export interface SecurityServicesResponse { + nextLink?: string; + value: SecurityServicesTypeList; +} + +// @public +export type SecurityServicesTypeEnum = string; + +// @public +export interface SecurityServicesTypeList { + entry: NameDescriptionObject[]; + type?: string; +} + +// @public +export interface SourceAddr { + cidrs?: string[]; + countries?: string[]; + feeds?: string[]; + prefixLists?: string[]; +} + +// @public +export type StateEnum = string; + +// @public +export interface StorageAccount { + accountName?: string; + id?: string; + subscriptionId?: string; +} + +// @public +export interface SupportInfo { + accountId?: string; + accountRegistered?: BooleanEnum; + freeTrial?: BooleanEnum; + freeTrialCreditLeft?: number; + freeTrialDaysLeft?: number; + helpURL?: string; + productSerial?: string; + productSku?: string; + registerURL?: string; + supportURL?: string; + userDomainSupported?: BooleanEnum; + userRegistered?: BooleanEnum; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TagInfo { + key: string; + value: string; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type UsageType = string; + +// @public +export interface VnetConfiguration { + ipOfTrustSubnetForUdr?: IPAddress; + trustSubnet: IPAddressSpace; + unTrustSubnet: IPAddressSpace; + vnet: IPAddressSpace; +} + +// @public +export interface VwanConfiguration { + ipOfTrustSubnetForUdr?: IPAddress; + networkVirtualApplianceId?: string; + trustSubnet?: IPAddressSpace; + unTrustSubnet?: IPAddressSpace; + vHub: IPAddressSpace; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/rollup.config.js b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/rollup.config.js @@ -0,0 +1,122 @@ +/* + * 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"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * 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/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + 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 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()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/sample.env b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/index.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/index.ts new file mode 100644 index 000000000000..391e946702a2 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { PaloAltoNetworksCloudngfw } from "./paloAltoNetworksCloudngfw"; +export * from "./operationsInterfaces"; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/lroImpl.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/index.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/index.ts new file mode 100644 index 000000000000..c5398261d496 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/index.ts @@ -0,0 +1,2567 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** The response of a GlobalRulestackResource list operation. */ +export interface GlobalRulestackResourceListResult { + /** The items on this page */ + value: GlobalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** security services */ +export interface SecurityServices { + /** IPs Vulnerability Profile Data */ + vulnerabilityProfile?: string; + /** Anti spyware Profile data */ + antiSpywareProfile?: string; + /** anti virus profile data */ + antiVirusProfile?: string; + /** URL filtering profile data */ + urlFilteringProfile?: string; + /** File blocking profile data */ + fileBlockingProfile?: string; + /** DNS Subscription profile data */ + dnsSubscription?: string; + /** Untrusted Egress Decryption profile data */ + outboundUnTrustCertificate?: string; + /** Trusted Egress Decryption profile data */ + outboundTrustCertificate?: string; +} + +/** The properties of the managed service identities assigned to this resource. */ +export interface AzureResourceManagerManagedIdentityProperties { + /** + * The Active Directory tenant id of the principal. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** + * The active directory identifier of this principal. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** The type of managed identity assigned to this resource. */ + type: ManagedIdentityType; + /** The identities assigned to this resource by the user. */ + userAssignedIdentities?: { + [propertyName: string]: AzureResourceManagerUserAssignedIdentity; + }; +} + +/** A managed identity assigned by the user. */ +export interface AzureResourceManagerUserAssignedIdentity { + /** The active directory client identifier for this principal. */ + clientId?: string; + /** The active directory identifier for this principal. */ + principalId?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** The type used for update operations of the GlobalRulestackResource. */ +export interface GlobalRulestackResourceUpdate { + /** Global Location */ + location?: string; + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** The updatable properties of the GlobalRulestackResource. */ + properties?: GlobalRulestackResourceUpdateProperties; +} + +/** The updatable properties of the GlobalRulestackResource. */ +export interface GlobalRulestackResourceUpdateProperties { + /** PanEtag info */ + panEtag?: string; + /** Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks */ + panLocation?: string; + /** Rulestack Type */ + scope?: ScopeType; + /** subscription scope of global rulestack */ + associatedSubscriptions?: string[]; + /** rulestack description */ + description?: string; + /** Mode for default rules creation */ + defaultMode?: DefaultMode; + /** minimum version */ + minAppIdVersion?: string; + /** Security Profile */ + securityServices?: SecurityServices; +} + +/** The response of a CertificateObjectGlobalRulestackResource list operation. */ +export interface CertificateObjectGlobalRulestackResourceListResult { + /** The items on this page */ + value: CertificateObjectGlobalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The response of a FqdnListGlobalRulestackResource list operation. */ +export interface FqdnListGlobalRulestackResourceListResult { + /** The items on this page */ + value: FqdnListGlobalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Changelog list */ +export interface Changelog { + /** list of changes */ + changes: string[]; + /** lastCommitted timestamp */ + lastCommitted?: Date; + /** lastModified timestamp */ + lastModified?: Date; +} + +/** advanced security object */ +export interface AdvSecurityObjectListResponse { + /** response value */ + value: AdvSecurityObjectModel; + /** next link */ + nextLink?: string; +} + +/** List of custom and predefined url category */ +export interface AdvSecurityObjectModel { + /** type of object */ + type?: string; + /** URL entry */ + entry: NameDescriptionObject[]; +} + +/** object type info */ +export interface NameDescriptionObject { + /** name value */ + name: string; + /** description value */ + description?: string; +} + +export interface ListAppIdResponse { + /** List of AppIds */ + value: string[]; + /** next Link */ + nextLink?: string; +} + +/** Countries Response Object */ +export interface CountriesResponse { + /** List of countries */ + value: Country[]; + /** next link */ + nextLink?: string; +} + +/** Country Description */ +export interface Country { + /** country code */ + code: string; + /** code description */ + description?: string; +} + +/** List firewalls response */ +export interface ListFirewallsResponse { + /** firewalls list */ + value: string[]; + /** next link */ + nextLink?: string; +} + +/** predefined url categories response */ +export interface PredefinedUrlCategoriesResponse { + /** predefined url categories */ + value: PredefinedUrlCategory[]; + /** next link */ + nextLink?: string; +} + +/** Predefined URL category object */ +export interface PredefinedUrlCategory { + action: string; + name: string; +} + +/** Security services list response */ +export interface SecurityServicesResponse { + /** response value */ + value: SecurityServicesTypeList; + /** next link */ + nextLink?: string; +} + +/** Security services type list */ +export interface SecurityServicesTypeList { + /** security services type */ + type?: string; + /** list */ + entry: NameDescriptionObject[]; +} + +/** The response of a PostRulesResource list operation. */ +export interface PostRulesResourceListResult { + /** The items on this page */ + value: PostRulesResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Address properties */ +export interface SourceAddr { + /** special value 'any' */ + cidrs?: string[]; + /** list of countries */ + countries?: string[]; + /** list of feeds */ + feeds?: string[]; + /** prefix list */ + prefixLists?: string[]; +} + +/** destination address */ +export interface DestinationAddr { + /** special value 'any' */ + cidrs?: string[]; + /** list of countries */ + countries?: string[]; + /** list of feeds */ + feeds?: string[]; + /** prefix list */ + prefixLists?: string[]; + /** fqdn list */ + fqdnLists?: string[]; +} + +/** URL/EDL to match */ +export interface Category { + /** custom URL */ + urlCustom: string[]; + /** feed list */ + feeds: string[]; +} + +/** Tag */ +export interface TagInfo { + /** tag name */ + key: string; + /** tag value */ + value: string; +} + +/** Rule counter */ +export interface RuleCounter { + /** priority number */ + priority: string; + /** rule Stack Name */ + ruleStackName?: string; + /** rule list name */ + ruleListName?: string; + /** firewall name */ + firewallName?: string; + /** rule name */ + ruleName: string; + /** hit count */ + hitCount?: number; + /** apps seen */ + appSeen?: AppSeenData; + /** timestamp of response */ + timestamp?: Date; + /** timestamp of request */ + requestTimestamp?: Date; + /** last updated timestamp */ + lastUpdatedTimestamp?: Date; +} + +/** Data Type for App Seen */ +export interface AppSeenData { + /** number of rows */ + count: number; + /** array of appSeen */ + appSeenList: AppSeenInfo[]; +} + +/** Definition for App Seen */ +export interface AppSeenInfo { + /** title */ + title: string; + /** category */ + category: string; + /** subCategory */ + subCategory: string; + /** risk */ + risk: string; + /** tag */ + tag: string; + /** technology */ + technology: string; + /** standardPorts */ + standardPorts: string; +} + +/** Rule counter reset */ +export interface RuleCounterReset { + /** + * priority number + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly priority?: string; + /** rule Stack Name */ + ruleStackName?: string; + /** rule list name */ + ruleListName?: string; + /** firewall name */ + firewallName?: string; + /** rule name */ + ruleName?: string; +} + +/** The response of a PrefixListGlobalRulestackResource list operation. */ +export interface PrefixListGlobalRulestackResourceListResult { + /** The items on this page */ + value: PrefixListGlobalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The response of a PreRulesResource list operation. */ +export interface PreRulesResourceListResult { + /** The items on this page */ + value: PreRulesResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** The response of a FirewallResource list operation. */ +export interface FirewallResourceListResult { + /** The items on this page */ + value: FirewallResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Network settings for Firewall */ +export interface NetworkProfile { + /** Vnet configurations */ + vnetConfiguration?: VnetConfiguration; + /** Vwan configurations */ + vwanConfiguration?: VwanConfiguration; + /** vnet or vwan, cannot be updated */ + networkType: NetworkType; + /** List of IPs associated with the Firewall */ + publicIps: IPAddress[]; + /** Enable egress NAT, enabled by default */ + enableEgressNat: EgressNat; + /** Egress nat IP to use */ + egressNatIp?: IPAddress[]; +} + +/** VnetInfo for Firewall Networking */ +export interface VnetConfiguration { + /** Azure Virtual Network */ + vnet: IPAddressSpace; + /** Trust Subnet */ + trustSubnet: IPAddressSpace; + /** Untrust Subnet */ + unTrustSubnet: IPAddressSpace; + /** IP of trust subnet for UDR */ + ipOfTrustSubnetForUdr?: IPAddress; +} + +/** IP Address Space */ +export interface IPAddressSpace { + /** Resource Id */ + resourceId?: string; + /** Address Space */ + addressSpace?: string; +} + +/** IP Address */ +export interface IPAddress { + /** Resource Id */ + resourceId?: string; + /** Address value */ + address?: string; +} + +/** VwanInfo for Firewall Networking */ +export interface VwanConfiguration { + /** Network Virtual Appliance resource ID */ + networkVirtualApplianceId?: string; + /** vHub Address */ + vHub: IPAddressSpace; + /** Trust Subnet */ + trustSubnet?: IPAddressSpace; + /** Untrust Subnet */ + unTrustSubnet?: IPAddressSpace; + /** IP of trust subnet for UDR */ + ipOfTrustSubnetForUdr?: IPAddress; +} + +/** Panorama Config */ +export interface PanoramaConfig { + /** Base64 encoded string representing Panorama parameters to be used by Firewall to connect to Panorama. This string is generated via azure plugin in Panorama */ + configString: string; + /** + * VM auth key for panorama connectivity + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmAuthKey?: string; + /** + * Primary Panorama Server IP address value in dotted format for IPv4 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly panoramaServer?: string; + /** + * Secondary Panorama Server IP address value in dotted format for IPv4 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly panoramaServer2?: string; + /** + * Panorama Device Group to join + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dgName?: string; + /** + * Panorama Template Stack to join - (Once configured we can not edit the value) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tplName?: string; + /** + * Panorama Collector Group to join - (Once configured we can not edit the value) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cgName?: string; + /** + * Resource name(may be unique) for PN admin + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; +} + +/** Associated rulestack details */ +export interface RulestackDetails { + /** Resource Id */ + resourceId?: string; + /** Associated rulestack Id */ + rulestackId?: string; + /** Rulestack location */ + location?: string; +} + +/** DNS Proxy settings for Firewall */ +export interface DNSSettings { + /** Enable DNS proxy, disabled by default */ + enableDnsProxy?: DNSProxy; + /** Enabled DNS proxy type, disabled by default */ + enabledDnsType?: EnabledDNSType; + /** List of IPs associated with the Firewall */ + dnsServers?: IPAddress[]; +} + +/** Frontend setting for Firewall */ +export interface FrontendSetting { + /** Settings name */ + name: string; + /** Protocol Type */ + protocol: ProtocolType; + /** Frontend configurations */ + frontendConfiguration: EndpointConfiguration; + /** Backend configurations */ + backendConfiguration: EndpointConfiguration; +} + +/** Endpoint Configuration for frontend and backend */ +export interface EndpointConfiguration { + /** port ID */ + port: string; + /** Address Space */ + address: IPAddress; +} + +/** Billing plan information. */ +export interface PlanData { + /** different usage type like PAYG/COMMITTED */ + usageType?: UsageType; + /** different billing cycles like MONTHLY/WEEKLY */ + billingCycle: BillingCycle; + /** plan id as published by Liftr.PAN */ + planId: string; + /** + * date when plan was applied + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly effectiveDate?: Date; +} + +/** MarketplaceDetails of PAN Firewall resource */ +export interface MarketplaceDetails { + /** + * Marketplace Subscription Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly marketplaceSubscriptionId?: string; + /** Offer Id */ + offerId: string; + /** Publisher Id */ + publisherId: string; + /** Marketplace Subscription Status */ + marketplaceSubscriptionStatus?: MarketplaceSubscriptionStatus; +} + +/** The response of a LocalRulestackResource list operation. */ +export interface LocalRulestackResourceListResult { + /** The items on this page */ + value: LocalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The type used for update operations of the FirewallResource. */ +export interface FirewallResourceUpdate { + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The updatable properties of the FirewallResource. */ + properties?: FirewallResourceUpdateProperties; +} + +/** The updatable properties of the FirewallResource. */ +export interface FirewallResourceUpdateProperties { + /** panEtag info */ + panEtag?: string; + /** Network settings */ + networkProfile?: NetworkProfile; + /** Panorama Managed: Default is False. Default will be CloudSec managed */ + isPanoramaManaged?: BooleanEnum; + /** Panorama Configuration */ + panoramaConfig?: PanoramaConfig; + /** Associated Rulestack */ + associatedRulestack?: RulestackDetails; + /** DNS settings for Firewall */ + dnsSettings?: DNSSettings; + /** Frontend settings for Firewall */ + frontEndSettings?: FrontendSetting[]; + /** Billing plan information. */ + planData?: PlanData; + /** Marketplace details */ + marketplaceDetails?: MarketplaceDetails; +} + +/** PAN Rulestack Describe Object */ +export interface GlobalRulestackInfo { + /** rulestack description */ + azureId: string; +} + +/** Log Settings for Firewall */ +export interface LogSettings { + /** One of possible log type */ + logType?: LogType; + /** Log option SAME/INDIVIDUAL */ + logOption?: LogOption; + /** Application Insight details */ + applicationInsights?: ApplicationInsights; + /** Common destination configurations */ + commonDestination?: LogDestination; + /** Traffic destination configurations */ + trafficLogDestination?: LogDestination; + /** Threat destination configurations */ + threatLogDestination?: LogDestination; + /** Decrypt destination configurations */ + decryptLogDestination?: LogDestination; +} + +/** Application Insights key */ +export interface ApplicationInsights { + /** Resource id for Application Insights */ + id?: string; + /** Application Insights key */ + key?: string; +} + +/** Log Destination */ +export interface LogDestination { + /** Storage account configurations */ + storageConfigurations?: StorageAccount; + /** Event Hub configurations */ + eventHubConfigurations?: EventHub; + /** Monitor Log configurations */ + monitorConfigurations?: MonitorLog; +} + +/** Storage Account configurations */ +export interface StorageAccount { + /** Resource ID of storage account */ + id?: string; + /** Subscription Id */ + subscriptionId?: string; + /** Storage account name */ + accountName?: string; +} + +/** EventHub configurations */ +export interface EventHub { + /** Resource ID of EventHub */ + id?: string; + /** Subscription Id */ + subscriptionId?: string; + /** EventHub name */ + name?: string; + /** EventHub namespace */ + nameSpace?: string; + /** EventHub policy name */ + policyName?: string; +} + +/** MonitorLog configurations */ +export interface MonitorLog { + /** Resource ID of MonitorLog */ + id?: string; + /** Subscription Id */ + subscriptionId?: string; + /** MonitorLog workspace */ + workspace?: string; + /** Primary Key value for Monitor */ + primaryKey?: string; + /** Secondary Key value for Monitor */ + secondaryKey?: string; +} + +/** Support information for the resource */ +export interface SupportInfo { + /** product SKU associated with given resource */ + productSku?: string; + /** product Serial associated with given resource */ + productSerial?: string; + /** account registered in Customer Support Portal */ + accountRegistered?: BooleanEnum; + /** Support account associated with given resource */ + accountId?: string; + /** user domain is supported in Customer Support Portal */ + userDomainSupported?: BooleanEnum; + /** user registered in Customer Support Portal */ + userRegistered?: BooleanEnum; + /** Product usage is in free trial period */ + freeTrial?: BooleanEnum; + /** Free trial days remaining */ + freeTrialDaysLeft?: number; + /** Free trial credit remaining */ + freeTrialCreditLeft?: number; + /** URL for paloaltonetworks live community */ + helpURL?: string; + /** URL for paloaltonetworks Customer Service Portal */ + supportURL?: string; + /** URL for registering product in paloaltonetworks Customer Service Portal */ + registerURL?: string; +} + +/** The type used for update operations of the LocalRulestackResource. */ +export interface LocalRulestackResourceUpdate { + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The updatable properties of the LocalRulestackResource. */ + properties?: LocalRulestackResourceUpdateProperties; +} + +/** The updatable properties of the LocalRulestackResource. */ +export interface LocalRulestackResourceUpdateProperties { + /** PanEtag info */ + panEtag?: string; + /** Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks */ + panLocation?: string; + /** Rulestack Type */ + scope?: ScopeType; + /** subscription scope of global rulestack */ + associatedSubscriptions?: string[]; + /** rulestack description */ + description?: string; + /** Mode for default rules creation */ + defaultMode?: DefaultMode; + /** minimum version */ + minAppIdVersion?: string; + /** Security Profile */ + securityServices?: SecurityServices; +} + +/** The response of a CertificateObjectLocalRulestackResource list operation. */ +export interface CertificateObjectLocalRulestackResourceListResult { + /** The items on this page */ + value: CertificateObjectLocalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The response of a FqdnListLocalRulestackResource list operation. */ +export interface FqdnListLocalRulestackResourceListResult { + /** The items on this page */ + value: FqdnListLocalRulestackResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The response of a LocalRulesResource list operation. */ +export interface LocalRulesResourceListResult { + /** The items on this page */ + value: LocalRulesResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The response of a PrefixListResource list operation. */ +export interface PrefixListResourceListResult { + /** The items on this page */ + value: PrefixListResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** PaloAltoNetworks GlobalRulestack */ +export interface GlobalRulestackResource extends ProxyResource { + /** Global Location */ + location: string; + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** PanEtag info */ + panEtag?: string; + /** Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks */ + panLocation?: string; + /** Rulestack Type */ + scope?: ScopeType; + /** subscription scope of global rulestack */ + associatedSubscriptions?: string[]; + /** rulestack description */ + description?: string; + /** Mode for default rules creation */ + defaultMode?: DefaultMode; + /** minimum version */ + minAppIdVersion?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Security Profile */ + securityServices?: SecurityServices; +} + +/** GlobalRulestack Certificate Object */ +export interface CertificateObjectGlobalRulestackResource + extends ProxyResource { + /** Resource Id of certificate signer, to be populated only when certificateSelfSigned is false */ + certificateSignerResourceId?: string; + /** use certificate self signed */ + certificateSelfSigned: BooleanEnum; + /** comment for this object */ + auditComment?: string; + /** user description for this object */ + description?: string; + /** read only string representing last create or update */ + etag?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** GlobalRulestack fqdnList */ +export interface FqdnListGlobalRulestackResource extends ProxyResource { + /** fqdn object description */ + description?: string; + /** fqdn list */ + fqdnList: string[]; + /** etag info */ + etag?: string; + /** comment for this object */ + auditComment?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** PostRulestack rule list */ +export interface PostRulesResource extends ProxyResource { + /** etag info */ + etag?: string; + /** rule name */ + ruleName: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly priority?: number; + /** rule description */ + description?: string; + /** state of this rule */ + ruleState?: StateEnum; + /** source address */ + source?: SourceAddr; + /** cidr should not be 'any' */ + negateSource?: BooleanEnum; + /** destination address */ + destination?: DestinationAddr; + /** cidr should not be 'any' */ + negateDestination?: BooleanEnum; + /** array of rule applications */ + applications?: string[]; + /** rule category */ + category?: Category; + /** any, application-default, TCP:number, UDP:number */ + protocol?: string; + /** prot port list */ + protocolPortList?: string[]; + /** inbound Inspection Certificate */ + inboundInspectionCertificate?: string; + /** rule comment */ + auditComment?: string; + /** rule action */ + actionType?: ActionEnum; + /** enable or disable logging */ + enableLogging?: StateEnum; + /** enable or disable decryption */ + decryptionRuleType?: DecryptionRuleTypeEnum; + /** tag for rule */ + tags?: TagInfo[]; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** GlobalRulestack prefixList */ +export interface PrefixListGlobalRulestackResource extends ProxyResource { + /** prefix description */ + description?: string; + /** prefix list */ + prefixList: string[]; + /** etag info */ + etag?: string; + /** comment for this object */ + auditComment?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** PreRulestack rule list */ +export interface PreRulesResource extends ProxyResource { + /** etag info */ + etag?: string; + /** rule name */ + ruleName: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly priority?: number; + /** rule description */ + description?: string; + /** state of this rule */ + ruleState?: StateEnum; + /** source address */ + source?: SourceAddr; + /** cidr should not be 'any' */ + negateSource?: BooleanEnum; + /** destination address */ + destination?: DestinationAddr; + /** cidr should not be 'any' */ + negateDestination?: BooleanEnum; + /** array of rule applications */ + applications?: string[]; + /** rule category */ + category?: Category; + /** any, application-default, TCP:number, UDP:number */ + protocol?: string; + /** prot port list */ + protocolPortList?: string[]; + /** inbound Inspection Certificate */ + inboundInspectionCertificate?: string; + /** rule comment */ + auditComment?: string; + /** rule action */ + actionType?: ActionEnum; + /** enable or disable logging */ + enableLogging?: StateEnum; + /** enable or disable decryption */ + decryptionRuleType?: DecryptionRuleTypeEnum; + /** tag for rule */ + tags?: TagInfo[]; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** LocalRulestack Certificate Object */ +export interface CertificateObjectLocalRulestackResource extends ProxyResource { + /** Resource Id of certificate signer, to be populated only when certificateSelfSigned is false */ + certificateSignerResourceId?: string; + /** use certificate self signed */ + certificateSelfSigned: BooleanEnum; + /** comment for this object */ + auditComment?: string; + /** user description for this object */ + description?: string; + /** read only string representing last create or update */ + etag?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** LocalRulestack fqdnList */ +export interface FqdnListLocalRulestackResource extends ProxyResource { + /** fqdn object description */ + description?: string; + /** fqdn list */ + fqdnList: string[]; + /** etag info */ + etag?: string; + /** comment for this object */ + auditComment?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** LocalRulestack rule list */ +export interface LocalRulesResource extends ProxyResource { + /** etag info */ + etag?: string; + /** rule name */ + ruleName: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly priority?: number; + /** rule description */ + description?: string; + /** state of this rule */ + ruleState?: StateEnum; + /** source address */ + source?: SourceAddr; + /** cidr should not be 'any' */ + negateSource?: BooleanEnum; + /** destination address */ + destination?: DestinationAddr; + /** cidr should not be 'any' */ + negateDestination?: BooleanEnum; + /** array of rule applications */ + applications?: string[]; + /** rule category */ + category?: Category; + /** any, application-default, TCP:number, UDP:number */ + protocol?: string; + /** prot port list */ + protocolPortList?: string[]; + /** inbound Inspection Certificate */ + inboundInspectionCertificate?: string; + /** rule comment */ + auditComment?: string; + /** rule action */ + actionType?: ActionEnum; + /** enable or disable logging */ + enableLogging?: StateEnum; + /** enable or disable decryption */ + decryptionRuleType?: DecryptionRuleTypeEnum; + /** tag for rule */ + tags?: TagInfo[]; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** LocalRulestack prefixList */ +export interface PrefixListResource extends ProxyResource { + /** prefix description */ + description?: string; + /** prefix list */ + prefixList: string[]; + /** etag info */ + etag?: string; + /** comment for this object */ + auditComment?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** PaloAltoNetworks Firewall */ +export interface FirewallResource extends TrackedResource { + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** panEtag info */ + panEtag?: string; + /** Network settings */ + networkProfile: NetworkProfile; + /** Panorama Managed: Default is False. Default will be CloudSec managed */ + isPanoramaManaged?: BooleanEnum; + /** Panorama Configuration */ + panoramaConfig?: PanoramaConfig; + /** Associated Rulestack */ + associatedRulestack?: RulestackDetails; + /** DNS settings for Firewall */ + dnsSettings: DNSSettings; + /** Frontend settings for Firewall */ + frontEndSettings?: FrontendSetting[]; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Billing plan information. */ + planData: PlanData; + /** Marketplace details */ + marketplaceDetails: MarketplaceDetails; +} + +/** PaloAltoNetworks LocalRulestack */ +export interface LocalRulestackResource extends TrackedResource { + /** The managed service identities assigned to this resource. */ + identity?: AzureResourceManagerManagedIdentityProperties; + /** PanEtag info */ + panEtag?: string; + /** Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks */ + panLocation?: string; + /** Rulestack Type */ + scope?: ScopeType; + /** subscription scope of global rulestack */ + associatedSubscriptions?: string[]; + /** rulestack description */ + description?: string; + /** Mode for default rules creation */ + defaultMode?: DefaultMode; + /** minimum version */ + minAppIdVersion?: string; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Security Profile */ + securityServices?: SecurityServices; +} + +/** Known values of {@link ScopeType} that the service accepts. */ +export enum KnownScopeType { + /** Local */ + Local = "LOCAL", + /** Global */ + Global = "GLOBAL" +} + +/** + * Defines values for ScopeType. \ + * {@link KnownScopeType} can be used interchangeably with ScopeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LOCAL** \ + * **GLOBAL** + */ +export type ScopeType = string; + +/** Known values of {@link DefaultMode} that the service accepts. */ +export enum KnownDefaultMode { + /** IPS */ + IPS = "IPS", + /** Firewall */ + Firewall = "FIREWALL", + /** None */ + None = "NONE" +} + +/** + * Defines values for DefaultMode. \ + * {@link KnownDefaultMode} can be used interchangeably with DefaultMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPS** \ + * **FIREWALL** \ + * **NONE** + */ +export type DefaultMode = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Accepted */ + Accepted = "Accepted", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Deleted */ + Deleted = "Deleted", + /** NotSpecified */ + NotSpecified = "NotSpecified" +} + +/** + * 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 + * **Accepted** \ + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Deleted** \ + * **NotSpecified** + */ +export type ProvisioningState = string; + +/** Known values of {@link ManagedIdentityType} that the service accepts. */ +export enum KnownManagedIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAndUserAssigned */ + SystemAndUserAssigned = "SystemAssigned,UserAssigned" +} + +/** + * Defines values for ManagedIdentityType. \ + * {@link KnownManagedIdentityType} can be used interchangeably with ManagedIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedIdentityType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link BooleanEnum} that the service accepts. */ +export enum KnownBooleanEnum { + /** True */ + True = "TRUE", + /** False */ + False = "FALSE" +} + +/** + * Defines values for BooleanEnum. \ + * {@link KnownBooleanEnum} can be used interchangeably with BooleanEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TRUE** \ + * **FALSE** + */ +export type BooleanEnum = string; + +/** Known values of {@link AdvSecurityObjectTypeEnum} that the service accepts. */ +export enum KnownAdvSecurityObjectTypeEnum { + /** UrlCustom */ + UrlCustom = "urlCustom", + /** Feeds */ + Feeds = "feeds" +} + +/** + * Defines values for AdvSecurityObjectTypeEnum. \ + * {@link KnownAdvSecurityObjectTypeEnum} can be used interchangeably with AdvSecurityObjectTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **urlCustom** \ + * **feeds** + */ +export type AdvSecurityObjectTypeEnum = string; + +/** Known values of {@link SecurityServicesTypeEnum} that the service accepts. */ +export enum KnownSecurityServicesTypeEnum { + /** AntiSpyware */ + AntiSpyware = "antiSpyware", + /** AntiVirus */ + AntiVirus = "antiVirus", + /** IpsVulnerability */ + IpsVulnerability = "ipsVulnerability", + /** UrlFiltering */ + UrlFiltering = "urlFiltering", + /** FileBlocking */ + FileBlocking = "fileBlocking", + /** DnsSubscription */ + DnsSubscription = "dnsSubscription" +} + +/** + * Defines values for SecurityServicesTypeEnum. \ + * {@link KnownSecurityServicesTypeEnum} can be used interchangeably with SecurityServicesTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **antiSpyware** \ + * **antiVirus** \ + * **ipsVulnerability** \ + * **urlFiltering** \ + * **fileBlocking** \ + * **dnsSubscription** + */ +export type SecurityServicesTypeEnum = string; + +/** Known values of {@link StateEnum} that the service accepts. */ +export enum KnownStateEnum { + /** Disabled */ + Disabled = "DISABLED", + /** Enabled */ + Enabled = "ENABLED" +} + +/** + * Defines values for StateEnum. \ + * {@link KnownStateEnum} can be used interchangeably with StateEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DISABLED** \ + * **ENABLED** + */ +export type StateEnum = string; + +/** Known values of {@link ActionEnum} that the service accepts. */ +export enum KnownActionEnum { + /** Allow */ + Allow = "Allow", + /** DenySilent */ + DenySilent = "DenySilent", + /** DenyResetServer */ + DenyResetServer = "DenyResetServer", + /** DenyResetBoth */ + DenyResetBoth = "DenyResetBoth" +} + +/** + * Defines values for ActionEnum. \ + * {@link KnownActionEnum} can be used interchangeably with ActionEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow** \ + * **DenySilent** \ + * **DenyResetServer** \ + * **DenyResetBoth** + */ +export type ActionEnum = string; + +/** Known values of {@link DecryptionRuleTypeEnum} that the service accepts. */ +export enum KnownDecryptionRuleTypeEnum { + /** SSLOutboundInspection */ + SSLOutboundInspection = "SSLOutboundInspection", + /** SSLInboundInspection */ + SSLInboundInspection = "SSLInboundInspection", + /** None */ + None = "None" +} + +/** + * Defines values for DecryptionRuleTypeEnum. \ + * {@link KnownDecryptionRuleTypeEnum} can be used interchangeably with DecryptionRuleTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SSLOutboundInspection** \ + * **SSLInboundInspection** \ + * **None** + */ +export type DecryptionRuleTypeEnum = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link NetworkType} that the service accepts. */ +export enum KnownNetworkType { + /** Vnet */ + Vnet = "VNET", + /** Vwan */ + Vwan = "VWAN" +} + +/** + * Defines values for NetworkType. \ + * {@link KnownNetworkType} can be used interchangeably with NetworkType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VNET** \ + * **VWAN** + */ +export type NetworkType = string; + +/** Known values of {@link EgressNat} that the service accepts. */ +export enum KnownEgressNat { + /** Disabled */ + Disabled = "DISABLED", + /** Enabled */ + Enabled = "ENABLED" +} + +/** + * Defines values for EgressNat. \ + * {@link KnownEgressNat} can be used interchangeably with EgressNat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DISABLED** \ + * **ENABLED** + */ +export type EgressNat = string; + +/** Known values of {@link DNSProxy} that the service accepts. */ +export enum KnownDNSProxy { + /** Disabled */ + Disabled = "DISABLED", + /** Enabled */ + Enabled = "ENABLED" +} + +/** + * Defines values for DNSProxy. \ + * {@link KnownDNSProxy} can be used interchangeably with DNSProxy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DISABLED** \ + * **ENABLED** + */ +export type DNSProxy = string; + +/** Known values of {@link EnabledDNSType} that the service accepts. */ +export enum KnownEnabledDNSType { + /** Custom */ + Custom = "CUSTOM", + /** Azure */ + Azure = "AZURE" +} + +/** + * Defines values for EnabledDNSType. \ + * {@link KnownEnabledDNSType} can be used interchangeably with EnabledDNSType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CUSTOM** \ + * **AZURE** + */ +export type EnabledDNSType = string; + +/** Known values of {@link ProtocolType} that the service accepts. */ +export enum KnownProtocolType { + /** TCP */ + TCP = "TCP", + /** UDP */ + UDP = "UDP" +} + +/** + * Defines values for ProtocolType. \ + * {@link KnownProtocolType} can be used interchangeably with ProtocolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP** \ + * **UDP** + */ +export type ProtocolType = string; + +/** Known values of {@link UsageType} that the service accepts. */ +export enum KnownUsageType { + /** Payg */ + Payg = "PAYG", + /** Committed */ + Committed = "COMMITTED" +} + +/** + * Defines values for UsageType. \ + * {@link KnownUsageType} can be used interchangeably with UsageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PAYG** \ + * **COMMITTED** + */ +export type UsageType = string; + +/** Known values of {@link BillingCycle} that the service accepts. */ +export enum KnownBillingCycle { + /** Weekly */ + Weekly = "WEEKLY", + /** Monthly */ + Monthly = "MONTHLY" +} + +/** + * Defines values for BillingCycle. \ + * {@link KnownBillingCycle} can be used interchangeably with BillingCycle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **WEEKLY** \ + * **MONTHLY** + */ +export type BillingCycle = string; + +/** Known values of {@link MarketplaceSubscriptionStatus} that the service accepts. */ +export enum KnownMarketplaceSubscriptionStatus { + /** PendingFulfillmentStart */ + PendingFulfillmentStart = "PendingFulfillmentStart", + /** Subscribed */ + Subscribed = "Subscribed", + /** Suspended */ + Suspended = "Suspended", + /** Unsubscribed */ + Unsubscribed = "Unsubscribed", + /** NotStarted */ + NotStarted = "NotStarted", + /** FulfillmentRequested */ + FulfillmentRequested = "FulfillmentRequested" +} + +/** + * Defines values for MarketplaceSubscriptionStatus. \ + * {@link KnownMarketplaceSubscriptionStatus} can be used interchangeably with MarketplaceSubscriptionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PendingFulfillmentStart** \ + * **Subscribed** \ + * **Suspended** \ + * **Unsubscribed** \ + * **NotStarted** \ + * **FulfillmentRequested** + */ +export type MarketplaceSubscriptionStatus = string; + +/** Known values of {@link LogType} that the service accepts. */ +export enum KnownLogType { + /** Traffic */ + Traffic = "TRAFFIC", + /** Threat */ + Threat = "THREAT", + /** Decryption */ + Decryption = "DECRYPTION", + /** Wildfire */ + Wildfire = "WILDFIRE", + /** DLP */ + DLP = "DLP", + /** Audit */ + Audit = "AUDIT" +} + +/** + * Defines values for LogType. \ + * {@link KnownLogType} can be used interchangeably with LogType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TRAFFIC** \ + * **THREAT** \ + * **DECRYPTION** \ + * **WILDFIRE** \ + * **DLP** \ + * **AUDIT** + */ +export type LogType = string; + +/** Known values of {@link LogOption} that the service accepts. */ +export enum KnownLogOption { + /** SameDestination */ + SameDestination = "SAME_DESTINATION", + /** IndividualDestination */ + IndividualDestination = "INDIVIDUAL_DESTINATION" +} + +/** + * Defines values for LogOption. \ + * {@link KnownLogOption} can be used interchangeably with LogOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SAME_DESTINATION** \ + * **INDIVIDUAL_DESTINATION** + */ +export type LogOption = string; + +/** Optional parameters. */ +export interface GlobalRulestackListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GlobalRulestackListResponse = GlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface GlobalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GlobalRulestackGetResponse = GlobalRulestackResource; + +/** Optional parameters. */ +export interface GlobalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GlobalRulestackCreateOrUpdateResponse = GlobalRulestackResource; + +/** Optional parameters. */ +export interface GlobalRulestackUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type GlobalRulestackUpdateResponse = GlobalRulestackResource; + +/** Optional parameters. */ +export interface GlobalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface GlobalRulestackCommitOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface GlobalRulestackGetChangeLogOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getChangeLog operation. */ +export type GlobalRulestackGetChangeLogResponse = Changelog; + +/** Optional parameters. */ +export interface GlobalRulestackListAdvancedSecurityObjectsOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listAdvancedSecurityObjects operation. */ +export type GlobalRulestackListAdvancedSecurityObjectsResponse = AdvSecurityObjectListResponse; + +/** Optional parameters. */ +export interface GlobalRulestackListAppIdsOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; + appIdVersion?: string; + appPrefix?: string; +} + +/** Contains response data for the listAppIds operation. */ +export type GlobalRulestackListAppIdsResponse = ListAppIdResponse; + +/** Optional parameters. */ +export interface GlobalRulestackListCountriesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listCountries operation. */ +export type GlobalRulestackListCountriesResponse = CountriesResponse; + +/** Optional parameters. */ +export interface GlobalRulestackListFirewallsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listFirewalls operation. */ +export type GlobalRulestackListFirewallsResponse = ListFirewallsResponse; + +/** Optional parameters. */ +export interface GlobalRulestackListPredefinedUrlCategoriesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listPredefinedUrlCategories operation. */ +export type GlobalRulestackListPredefinedUrlCategoriesResponse = PredefinedUrlCategoriesResponse; + +/** Optional parameters. */ +export interface GlobalRulestackListSecurityServicesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listSecurityServices operation. */ +export type GlobalRulestackListSecurityServicesResponse = SecurityServicesResponse; + +/** Optional parameters. */ +export interface GlobalRulestackRevertOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface GlobalRulestackListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GlobalRulestackListNextResponse = GlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface CertificateObjectGlobalRulestackListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type CertificateObjectGlobalRulestackListResponse = CertificateObjectGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface CertificateObjectGlobalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CertificateObjectGlobalRulestackGetResponse = CertificateObjectGlobalRulestackResource; + +/** Optional parameters. */ +export interface CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type CertificateObjectGlobalRulestackCreateOrUpdateResponse = CertificateObjectGlobalRulestackResource; + +/** Optional parameters. */ +export interface CertificateObjectGlobalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface CertificateObjectGlobalRulestackListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type CertificateObjectGlobalRulestackListNextResponse = CertificateObjectGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface FqdnListGlobalRulestackListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FqdnListGlobalRulestackListResponse = FqdnListGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface FqdnListGlobalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FqdnListGlobalRulestackGetResponse = FqdnListGlobalRulestackResource; + +/** Optional parameters. */ +export interface FqdnListGlobalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type FqdnListGlobalRulestackCreateOrUpdateResponse = FqdnListGlobalRulestackResource; + +/** Optional parameters. */ +export interface FqdnListGlobalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface FqdnListGlobalRulestackListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FqdnListGlobalRulestackListNextResponse = FqdnListGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface PostRulesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PostRulesListResponse = PostRulesResourceListResult; + +/** Optional parameters. */ +export interface PostRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PostRulesGetResponse = PostRulesResource; + +/** Optional parameters. */ +export interface PostRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PostRulesCreateOrUpdateResponse = PostRulesResource; + +/** Optional parameters. */ +export interface PostRulesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PostRulesGetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the getCounters operation. */ +export type PostRulesGetCountersResponse = RuleCounter; + +/** Optional parameters. */ +export interface PostRulesRefreshCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Optional parameters. */ +export interface PostRulesResetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the resetCounters operation. */ +export type PostRulesResetCountersResponse = RuleCounterReset; + +/** Optional parameters. */ +export interface PostRulesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PostRulesListNextResponse = PostRulesResourceListResult; + +/** Optional parameters. */ +export interface PrefixListGlobalRulestackListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PrefixListGlobalRulestackListResponse = PrefixListGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface PrefixListGlobalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrefixListGlobalRulestackGetResponse = PrefixListGlobalRulestackResource; + +/** Optional parameters. */ +export interface PrefixListGlobalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrefixListGlobalRulestackCreateOrUpdateResponse = PrefixListGlobalRulestackResource; + +/** Optional parameters. */ +export interface PrefixListGlobalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrefixListGlobalRulestackListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PrefixListGlobalRulestackListNextResponse = PrefixListGlobalRulestackResourceListResult; + +/** Optional parameters. */ +export interface PreRulesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PreRulesListResponse = PreRulesResourceListResult; + +/** Optional parameters. */ +export interface PreRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PreRulesGetResponse = PreRulesResource; + +/** Optional parameters. */ +export interface PreRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PreRulesCreateOrUpdateResponse = PreRulesResource; + +/** Optional parameters. */ +export interface PreRulesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PreRulesGetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the getCounters operation. */ +export type PreRulesGetCountersResponse = RuleCounter; + +/** Optional parameters. */ +export interface PreRulesRefreshCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Optional parameters. */ +export interface PreRulesResetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the resetCounters operation. */ +export type PreRulesResetCountersResponse = RuleCounterReset; + +/** Optional parameters. */ +export interface PreRulesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PreRulesListNextResponse = PreRulesResourceListResult; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface FirewallsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type FirewallsListBySubscriptionResponse = FirewallResourceListResult; + +/** Optional parameters. */ +export interface FirewallsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type FirewallsListByResourceGroupResponse = FirewallResourceListResult; + +/** Optional parameters. */ +export interface FirewallsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FirewallsGetResponse = FirewallResource; + +/** Optional parameters. */ +export interface FirewallsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type FirewallsCreateOrUpdateResponse = FirewallResource; + +/** Optional parameters. */ +export interface FirewallsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type FirewallsUpdateResponse = FirewallResource; + +/** Optional parameters. */ +export interface FirewallsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface FirewallsGetGlobalRulestackOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getGlobalRulestack operation. */ +export type FirewallsGetGlobalRulestackResponse = GlobalRulestackInfo; + +/** Optional parameters. */ +export interface FirewallsGetLogProfileOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getLogProfile operation. */ +export type FirewallsGetLogProfileResponse = LogSettings; + +/** Optional parameters. */ +export interface FirewallsGetSupportInfoOptionalParams + extends coreClient.OperationOptions { + /** email address on behalf of which this API called */ + email?: string; +} + +/** Contains response data for the getSupportInfo operation. */ +export type FirewallsGetSupportInfoResponse = SupportInfo; + +/** Optional parameters. */ +export interface FirewallsSaveLogProfileOptionalParams + extends coreClient.OperationOptions { + /** Log Settings for Firewall */ + logSettings?: LogSettings; +} + +/** Optional parameters. */ +export interface FirewallsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type FirewallsListBySubscriptionNextResponse = FirewallResourceListResult; + +/** Optional parameters. */ +export interface FirewallsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type FirewallsListByResourceGroupNextResponse = FirewallResourceListResult; + +/** Optional parameters. */ +export interface LocalRulestacksListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type LocalRulestacksListBySubscriptionResponse = LocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface LocalRulestacksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type LocalRulestacksListByResourceGroupResponse = LocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface LocalRulestacksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LocalRulestacksGetResponse = LocalRulestackResource; + +/** Optional parameters. */ +export interface LocalRulestacksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type LocalRulestacksCreateOrUpdateResponse = LocalRulestackResource; + +/** Optional parameters. */ +export interface LocalRulestacksUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type LocalRulestacksUpdateResponse = LocalRulestackResource; + +/** Optional parameters. */ +export interface LocalRulestacksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface LocalRulestacksCommitOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface LocalRulestacksGetChangeLogOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getChangeLog operation. */ +export type LocalRulestacksGetChangeLogResponse = Changelog; + +/** Optional parameters. */ +export interface LocalRulestacksGetSupportInfoOptionalParams + extends coreClient.OperationOptions { + /** email address on behalf of which this API called */ + email?: string; +} + +/** Contains response data for the getSupportInfo operation. */ +export type LocalRulestacksGetSupportInfoResponse = SupportInfo; + +/** Optional parameters. */ +export interface LocalRulestacksListAdvancedSecurityObjectsOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listAdvancedSecurityObjects operation. */ +export type LocalRulestacksListAdvancedSecurityObjectsResponse = AdvSecurityObjectListResponse; + +/** Optional parameters. */ +export interface LocalRulestacksListAppIdsOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; + appIdVersion?: string; + appPrefix?: string; +} + +/** Contains response data for the listAppIds operation. */ +export type LocalRulestacksListAppIdsResponse = ListAppIdResponse; + +/** Optional parameters. */ +export interface LocalRulestacksListCountriesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listCountries operation. */ +export type LocalRulestacksListCountriesResponse = CountriesResponse; + +/** Optional parameters. */ +export interface LocalRulestacksListFirewallsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listFirewalls operation. */ +export type LocalRulestacksListFirewallsResponse = ListFirewallsResponse; + +/** Optional parameters. */ +export interface LocalRulestacksListPredefinedUrlCategoriesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listPredefinedUrlCategories operation. */ +export type LocalRulestacksListPredefinedUrlCategoriesResponse = PredefinedUrlCategoriesResponse; + +/** Optional parameters. */ +export interface LocalRulestacksListSecurityServicesOptionalParams + extends coreClient.OperationOptions { + skip?: string; + top?: number; +} + +/** Contains response data for the listSecurityServices operation. */ +export type LocalRulestacksListSecurityServicesResponse = SecurityServicesResponse; + +/** Optional parameters. */ +export interface LocalRulestacksRevertOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface LocalRulestacksListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type LocalRulestacksListBySubscriptionNextResponse = LocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface LocalRulestacksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type LocalRulestacksListByResourceGroupNextResponse = LocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacks operation. */ +export type CertificateObjectLocalRulestackListByLocalRulestacksResponse = CertificateObjectLocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface CertificateObjectLocalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CertificateObjectLocalRulestackGetResponse = CertificateObjectLocalRulestackResource; + +/** Optional parameters. */ +export interface CertificateObjectLocalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type CertificateObjectLocalRulestackCreateOrUpdateResponse = CertificateObjectLocalRulestackResource; + +/** Optional parameters. */ +export interface CertificateObjectLocalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface CertificateObjectLocalRulestackListByLocalRulestacksNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacksNext operation. */ +export type CertificateObjectLocalRulestackListByLocalRulestacksNextResponse = CertificateObjectLocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface FqdnListLocalRulestackListByLocalRulestacksOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacks operation. */ +export type FqdnListLocalRulestackListByLocalRulestacksResponse = FqdnListLocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface FqdnListLocalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FqdnListLocalRulestackGetResponse = FqdnListLocalRulestackResource; + +/** Optional parameters. */ +export interface FqdnListLocalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type FqdnListLocalRulestackCreateOrUpdateResponse = FqdnListLocalRulestackResource; + +/** Optional parameters. */ +export interface FqdnListLocalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface FqdnListLocalRulestackListByLocalRulestacksNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacksNext operation. */ +export type FqdnListLocalRulestackListByLocalRulestacksNextResponse = FqdnListLocalRulestackResourceListResult; + +/** Optional parameters. */ +export interface LocalRulesListByLocalRulestacksOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacks operation. */ +export type LocalRulesListByLocalRulestacksResponse = LocalRulesResourceListResult; + +/** Optional parameters. */ +export interface LocalRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LocalRulesGetResponse = LocalRulesResource; + +/** Optional parameters. */ +export interface LocalRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type LocalRulesCreateOrUpdateResponse = LocalRulesResource; + +/** Optional parameters. */ +export interface LocalRulesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface LocalRulesGetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the getCounters operation. */ +export type LocalRulesGetCountersResponse = RuleCounter; + +/** Optional parameters. */ +export interface LocalRulesRefreshCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Optional parameters. */ +export interface LocalRulesResetCountersOptionalParams + extends coreClient.OperationOptions { + firewallName?: string; +} + +/** Contains response data for the resetCounters operation. */ +export type LocalRulesResetCountersResponse = RuleCounterReset; + +/** Optional parameters. */ +export interface LocalRulesListByLocalRulestacksNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacksNext operation. */ +export type LocalRulesListByLocalRulestacksNextResponse = LocalRulesResourceListResult; + +/** Optional parameters. */ +export interface PrefixListLocalRulestackListByLocalRulestacksOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacks operation. */ +export type PrefixListLocalRulestackListByLocalRulestacksResponse = PrefixListResourceListResult; + +/** Optional parameters. */ +export interface PrefixListLocalRulestackGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PrefixListLocalRulestackGetResponse = PrefixListResource; + +/** Optional parameters. */ +export interface PrefixListLocalRulestackCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PrefixListLocalRulestackCreateOrUpdateResponse = PrefixListResource; + +/** Optional parameters. */ +export interface PrefixListLocalRulestackDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PrefixListLocalRulestackListByLocalRulestacksNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocalRulestacksNext operation. */ +export type PrefixListLocalRulestackListByLocalRulestacksNextResponse = PrefixListResourceListResult; + +/** Optional parameters. */ +export interface PaloAltoNetworksCloudngfwOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/mappers.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/mappers.ts new file mode 100644 index 000000000000..8b1620cda414 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/mappers.ts @@ -0,0 +1,3508 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const GlobalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GlobalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityServices: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityServices", + modelProperties: { + vulnerabilityProfile: { + serializedName: "vulnerabilityProfile", + type: { + name: "String" + } + }, + antiSpywareProfile: { + serializedName: "antiSpywareProfile", + type: { + name: "String" + } + }, + antiVirusProfile: { + serializedName: "antiVirusProfile", + type: { + name: "String" + } + }, + urlFilteringProfile: { + serializedName: "urlFilteringProfile", + type: { + name: "String" + } + }, + fileBlockingProfile: { + serializedName: "fileBlockingProfile", + type: { + name: "String" + } + }, + dnsSubscription: { + serializedName: "dnsSubscription", + type: { + name: "String" + } + }, + outboundUnTrustCertificate: { + serializedName: "outboundUnTrustCertificate", + type: { + name: "String" + } + }, + outboundTrustCertificate: { + serializedName: "outboundTrustCertificate", + type: { + name: "String" + } + } + } + } +}; + +export const AzureResourceManagerManagedIdentityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties", + modelProperties: { + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "AzureResourceManagerUserAssignedIdentity" + } + } + } + } + } + } +}; + +export const AzureResourceManagerUserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureResourceManagerUserAssignedIdentity", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const GlobalRulestackResourceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalRulestackResourceUpdate", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GlobalRulestackResourceUpdateProperties" + } + } + } + } +}; + +export const GlobalRulestackResourceUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalRulestackResourceUpdateProperties", + modelProperties: { + panEtag: { + serializedName: "panEtag", + type: { + name: "String" + } + }, + panLocation: { + serializedName: "panLocation", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + type: { + name: "String" + } + }, + associatedSubscriptions: { + serializedName: "associatedSubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + defaultMode: { + serializedName: "defaultMode", + type: { + name: "String" + } + }, + minAppIdVersion: { + serializedName: "minAppIdVersion", + type: { + name: "String" + } + }, + securityServices: { + serializedName: "securityServices", + type: { + name: "Composite", + className: "SecurityServices" + } + } + } + } +}; + +export const CertificateObjectGlobalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateObjectGlobalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateObjectGlobalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FqdnListGlobalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FqdnListGlobalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FqdnListGlobalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Changelog: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Changelog", + modelProperties: { + changes: { + serializedName: "changes", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lastCommitted: { + serializedName: "lastCommitted", + type: { + name: "DateTime" + } + }, + lastModified: { + serializedName: "lastModified", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AdvSecurityObjectListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvSecurityObjectListResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Composite", + className: "AdvSecurityObjectModel" + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AdvSecurityObjectModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdvSecurityObjectModel", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + entry: { + serializedName: "entry", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NameDescriptionObject" + } + } + } + } + } + } +}; + +export const NameDescriptionObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NameDescriptionObject", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ListAppIdResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListAppIdResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CountriesResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CountriesResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Country" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Country: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Country", + modelProperties: { + code: { + serializedName: "code", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ListFirewallsResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListFirewallsResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PredefinedUrlCategoriesResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PredefinedUrlCategoriesResponse", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PredefinedUrlCategory" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PredefinedUrlCategory: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PredefinedUrlCategory", + modelProperties: { + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SecurityServicesResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityServicesResponse", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Composite", + className: "SecurityServicesTypeList" + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityServicesTypeList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityServicesTypeList", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + entry: { + serializedName: "entry", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NameDescriptionObject" + } + } + } + } + } + } +}; + +export const PostRulesResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PostRulesResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PostRulesResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SourceAddr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceAddr", + modelProperties: { + cidrs: { + serializedName: "cidrs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + countries: { + serializedName: "countries", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + feeds: { + serializedName: "feeds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + prefixLists: { + serializedName: "prefixLists", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DestinationAddr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DestinationAddr", + modelProperties: { + cidrs: { + serializedName: "cidrs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + countries: { + serializedName: "countries", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + feeds: { + serializedName: "feeds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + prefixLists: { + serializedName: "prefixLists", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + fqdnLists: { + serializedName: "fqdnLists", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Category: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Category", + modelProperties: { + urlCustom: { + serializedName: "urlCustom", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + feeds: { + serializedName: "feeds", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TagInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagInfo", + modelProperties: { + key: { + serializedName: "key", + required: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RuleCounter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleCounter", + modelProperties: { + priority: { + serializedName: "priority", + required: true, + type: { + name: "String" + } + }, + ruleStackName: { + serializedName: "ruleStackName", + type: { + name: "String" + } + }, + ruleListName: { + serializedName: "ruleListName", + type: { + name: "String" + } + }, + firewallName: { + serializedName: "firewallName", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "ruleName", + required: true, + type: { + name: "String" + } + }, + hitCount: { + serializedName: "hitCount", + type: { + name: "Number" + } + }, + appSeen: { + serializedName: "appSeen", + type: { + name: "Composite", + className: "AppSeenData" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + requestTimestamp: { + serializedName: "requestTimestamp", + type: { + name: "DateTime" + } + }, + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AppSeenData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppSeenData", + modelProperties: { + count: { + serializedName: "count", + required: true, + type: { + name: "Number" + } + }, + appSeenList: { + serializedName: "appSeenList", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppSeenInfo" + } + } + } + } + } + } +}; + +export const AppSeenInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppSeenInfo", + modelProperties: { + title: { + serializedName: "title", + required: true, + type: { + name: "String" + } + }, + category: { + serializedName: "category", + required: true, + type: { + name: "String" + } + }, + subCategory: { + serializedName: "subCategory", + required: true, + type: { + name: "String" + } + }, + risk: { + serializedName: "risk", + required: true, + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + required: true, + type: { + name: "String" + } + }, + technology: { + serializedName: "technology", + required: true, + type: { + name: "String" + } + }, + standardPorts: { + serializedName: "standardPorts", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RuleCounterReset: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleCounterReset", + modelProperties: { + priority: { + serializedName: "priority", + readOnly: true, + type: { + name: "String" + } + }, + ruleStackName: { + serializedName: "ruleStackName", + type: { + name: "String" + } + }, + ruleListName: { + serializedName: "ruleListName", + type: { + name: "String" + } + }, + firewallName: { + serializedName: "firewallName", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "ruleName", + type: { + name: "String" + } + } + } + } +}; + +export const PrefixListGlobalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrefixListGlobalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrefixListGlobalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PreRulesResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PreRulesResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreRulesResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FirewallResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + vnetConfiguration: { + serializedName: "vnetConfiguration", + type: { + name: "Composite", + className: "VnetConfiguration" + } + }, + vwanConfiguration: { + serializedName: "vwanConfiguration", + type: { + name: "Composite", + className: "VwanConfiguration" + } + }, + networkType: { + serializedName: "networkType", + required: true, + type: { + name: "String" + } + }, + publicIps: { + serializedName: "publicIps", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPAddress" + } + } + } + }, + enableEgressNat: { + serializedName: "enableEgressNat", + required: true, + type: { + name: "String" + } + }, + egressNatIp: { + serializedName: "egressNatIp", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPAddress" + } + } + } + } + } + } +}; + +export const VnetConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VnetConfiguration", + modelProperties: { + vnet: { + serializedName: "vnet", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + trustSubnet: { + serializedName: "trustSubnet", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + unTrustSubnet: { + serializedName: "unTrustSubnet", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + ipOfTrustSubnetForUdr: { + serializedName: "ipOfTrustSubnetForUdr", + type: { + name: "Composite", + className: "IPAddress" + } + } + } + } +}; + +export const IPAddressSpace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPAddressSpace", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + addressSpace: { + serializedName: "addressSpace", + type: { + name: "String" + } + } + } + } +}; + +export const IPAddress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPAddress", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + } + } + } +}; + +export const VwanConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VwanConfiguration", + modelProperties: { + networkVirtualApplianceId: { + serializedName: "networkVirtualApplianceId", + type: { + name: "String" + } + }, + vHub: { + serializedName: "vHub", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + trustSubnet: { + serializedName: "trustSubnet", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + unTrustSubnet: { + serializedName: "unTrustSubnet", + type: { + name: "Composite", + className: "IPAddressSpace" + } + }, + ipOfTrustSubnetForUdr: { + serializedName: "ipOfTrustSubnetForUdr", + type: { + name: "Composite", + className: "IPAddress" + } + } + } + } +}; + +export const PanoramaConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PanoramaConfig", + modelProperties: { + configString: { + serializedName: "configString", + required: true, + type: { + name: "String" + } + }, + vmAuthKey: { + serializedName: "vmAuthKey", + readOnly: true, + type: { + name: "String" + } + }, + panoramaServer: { + serializedName: "panoramaServer", + readOnly: true, + type: { + name: "String" + } + }, + panoramaServer2: { + serializedName: "panoramaServer2", + readOnly: true, + type: { + name: "String" + } + }, + dgName: { + serializedName: "dgName", + readOnly: true, + type: { + name: "String" + } + }, + tplName: { + serializedName: "tplName", + readOnly: true, + type: { + name: "String" + } + }, + cgName: { + serializedName: "cgName", + readOnly: true, + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RulestackDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RulestackDetails", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + rulestackId: { + serializedName: "rulestackId", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DNSSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DNSSettings", + modelProperties: { + enableDnsProxy: { + serializedName: "enableDnsProxy", + type: { + name: "String" + } + }, + enabledDnsType: { + serializedName: "enabledDnsType", + type: { + name: "String" + } + }, + dnsServers: { + serializedName: "dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPAddress" + } + } + } + } + } + } +}; + +export const FrontendSetting: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FrontendSetting", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + required: true, + type: { + name: "String" + } + }, + frontendConfiguration: { + serializedName: "frontendConfiguration", + type: { + name: "Composite", + className: "EndpointConfiguration" + } + }, + backendConfiguration: { + serializedName: "backendConfiguration", + type: { + name: "Composite", + className: "EndpointConfiguration" + } + } + } + } +}; + +export const EndpointConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointConfiguration", + modelProperties: { + port: { + serializedName: "port", + required: true, + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "Composite", + className: "IPAddress" + } + } + } + } +}; + +export const PlanData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlanData", + modelProperties: { + usageType: { + serializedName: "usageType", + type: { + name: "String" + } + }, + billingCycle: { + serializedName: "billingCycle", + required: true, + type: { + name: "String" + } + }, + planId: { + constraints: { + MaxLength: 50 + }, + serializedName: "planId", + required: true, + type: { + name: "String" + } + }, + effectiveDate: { + serializedName: "effectiveDate", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const MarketplaceDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceDetails", + modelProperties: { + marketplaceSubscriptionId: { + serializedName: "marketplaceSubscriptionId", + readOnly: true, + type: { + name: "String" + } + }, + offerId: { + serializedName: "offerId", + required: true, + type: { + name: "String" + } + }, + publisherId: { + serializedName: "publisherId", + required: true, + type: { + name: "String" + } + }, + marketplaceSubscriptionStatus: { + serializedName: "marketplaceSubscriptionStatus", + type: { + name: "String" + } + } + } + } +}; + +export const LocalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FirewallResourceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallResourceUpdate", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FirewallResourceUpdateProperties" + } + } + } + } +}; + +export const FirewallResourceUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallResourceUpdateProperties", + modelProperties: { + panEtag: { + serializedName: "panEtag", + type: { + name: "String" + } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + isPanoramaManaged: { + serializedName: "isPanoramaManaged", + type: { + name: "String" + } + }, + panoramaConfig: { + serializedName: "panoramaConfig", + type: { + name: "Composite", + className: "PanoramaConfig" + } + }, + associatedRulestack: { + serializedName: "associatedRulestack", + type: { + name: "Composite", + className: "RulestackDetails" + } + }, + dnsSettings: { + serializedName: "dnsSettings", + type: { + name: "Composite", + className: "DNSSettings" + } + }, + frontEndSettings: { + serializedName: "frontEndSettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FrontendSetting" + } + } + } + }, + planData: { + serializedName: "planData", + type: { + name: "Composite", + className: "PlanData" + } + }, + marketplaceDetails: { + serializedName: "marketplaceDetails", + type: { + name: "Composite", + className: "MarketplaceDetails" + } + } + } + } +}; + +export const GlobalRulestackInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalRulestackInfo", + modelProperties: { + azureId: { + serializedName: "azureId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const LogSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogSettings", + modelProperties: { + logType: { + serializedName: "logType", + type: { + name: "String" + } + }, + logOption: { + serializedName: "logOption", + type: { + name: "String" + } + }, + applicationInsights: { + serializedName: "applicationInsights", + type: { + name: "Composite", + className: "ApplicationInsights" + } + }, + commonDestination: { + serializedName: "commonDestination", + type: { + name: "Composite", + className: "LogDestination" + } + }, + trafficLogDestination: { + serializedName: "trafficLogDestination", + type: { + name: "Composite", + className: "LogDestination" + } + }, + threatLogDestination: { + serializedName: "threatLogDestination", + type: { + name: "Composite", + className: "LogDestination" + } + }, + decryptLogDestination: { + serializedName: "decryptLogDestination", + type: { + name: "Composite", + className: "LogDestination" + } + } + } + } +}; + +export const ApplicationInsights: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationInsights", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + key: { + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const LogDestination: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogDestination", + modelProperties: { + storageConfigurations: { + serializedName: "storageConfigurations", + type: { + name: "Composite", + className: "StorageAccount" + } + }, + eventHubConfigurations: { + serializedName: "eventHubConfigurations", + type: { + name: "Composite", + className: "EventHub" + } + }, + monitorConfigurations: { + serializedName: "monitorConfigurations", + type: { + name: "Composite", + className: "MonitorLog" + } + } + } + } +}; + +export const StorageAccount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageAccount", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + accountName: { + serializedName: "accountName", + type: { + name: "String" + } + } + } + } +}; + +export const EventHub: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventHub", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + nameSpace: { + serializedName: "nameSpace", + type: { + name: "String" + } + }, + policyName: { + serializedName: "policyName", + type: { + name: "String" + } + } + } + } +}; + +export const MonitorLog: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MonitorLog", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + workspace: { + serializedName: "workspace", + type: { + name: "String" + } + }, + primaryKey: { + serializedName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "secondaryKey", + type: { + name: "String" + } + } + } + } +}; + +export const SupportInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SupportInfo", + modelProperties: { + productSku: { + serializedName: "productSku", + type: { + name: "String" + } + }, + productSerial: { + serializedName: "productSerial", + type: { + name: "String" + } + }, + accountRegistered: { + serializedName: "accountRegistered", + type: { + name: "String" + } + }, + accountId: { + serializedName: "accountId", + type: { + name: "String" + } + }, + userDomainSupported: { + serializedName: "userDomainSupported", + type: { + name: "String" + } + }, + userRegistered: { + serializedName: "userRegistered", + type: { + name: "String" + } + }, + freeTrial: { + serializedName: "freeTrial", + type: { + name: "String" + } + }, + freeTrialDaysLeft: { + serializedName: "freeTrialDaysLeft", + type: { + name: "Number" + } + }, + freeTrialCreditLeft: { + serializedName: "freeTrialCreditLeft", + type: { + name: "Number" + } + }, + helpURL: { + serializedName: "helpURL", + type: { + name: "String" + } + }, + supportURL: { + serializedName: "supportURL", + type: { + name: "String" + } + }, + registerURL: { + serializedName: "registerURL", + type: { + name: "String" + } + } + } + } +}; + +export const LocalRulestackResourceUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulestackResourceUpdate", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LocalRulestackResourceUpdateProperties" + } + } + } + } +}; + +export const LocalRulestackResourceUpdateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulestackResourceUpdateProperties", + modelProperties: { + panEtag: { + serializedName: "panEtag", + type: { + name: "String" + } + }, + panLocation: { + serializedName: "panLocation", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + type: { + name: "String" + } + }, + associatedSubscriptions: { + serializedName: "associatedSubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + defaultMode: { + serializedName: "defaultMode", + type: { + name: "String" + } + }, + minAppIdVersion: { + serializedName: "minAppIdVersion", + type: { + name: "String" + } + }, + securityServices: { + serializedName: "securityServices", + type: { + name: "Composite", + className: "SecurityServices" + } + } + } + } +}; + +export const CertificateObjectLocalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateObjectLocalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateObjectLocalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FqdnListLocalRulestackResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FqdnListLocalRulestackResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FqdnListLocalRulestackResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LocalRulesResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulesResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocalRulesResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrefixListResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrefixListResourceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrefixListResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GlobalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GlobalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + panEtag: { + serializedName: "properties.panEtag", + type: { + name: "String" + } + }, + panLocation: { + serializedName: "properties.panLocation", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + associatedSubscriptions: { + serializedName: "properties.associatedSubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + defaultMode: { + serializedName: "properties.defaultMode", + type: { + name: "String" + } + }, + minAppIdVersion: { + serializedName: "properties.minAppIdVersion", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + securityServices: { + serializedName: "properties.securityServices", + type: { + name: "Composite", + className: "SecurityServices" + } + } + } + } +}; + +export const CertificateObjectGlobalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateObjectGlobalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + certificateSignerResourceId: { + serializedName: "properties.certificateSignerResourceId", + type: { + name: "String" + } + }, + certificateSelfSigned: { + serializedName: "properties.certificateSelfSigned", + required: true, + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FqdnListGlobalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FqdnListGlobalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + fqdnList: { + serializedName: "properties.fqdnList", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PostRulesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PostRulesResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "properties.ruleName", + required: true, + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + readOnly: true, + type: { + name: "Number" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + ruleState: { + serializedName: "properties.ruleState", + type: { + name: "String" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "SourceAddr" + } + }, + negateSource: { + serializedName: "properties.negateSource", + type: { + name: "String" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DestinationAddr" + } + }, + negateDestination: { + serializedName: "properties.negateDestination", + type: { + name: "String" + } + }, + applications: { + serializedName: "properties.applications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + category: { + serializedName: "properties.category", + type: { + name: "Composite", + className: "Category" + } + }, + protocol: { + defaultValue: "application-default", + serializedName: "properties.protocol", + type: { + name: "String" + } + }, + protocolPortList: { + serializedName: "properties.protocolPortList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + inboundInspectionCertificate: { + serializedName: "properties.inboundInspectionCertificate", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + actionType: { + serializedName: "properties.actionType", + type: { + name: "String" + } + }, + enableLogging: { + serializedName: "properties.enableLogging", + type: { + name: "String" + } + }, + decryptionRuleType: { + serializedName: "properties.decryptionRuleType", + type: { + name: "String" + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagInfo" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrefixListGlobalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrefixListGlobalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + prefixList: { + serializedName: "properties.prefixList", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PreRulesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PreRulesResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "properties.ruleName", + required: true, + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + readOnly: true, + type: { + name: "Number" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + ruleState: { + serializedName: "properties.ruleState", + type: { + name: "String" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "SourceAddr" + } + }, + negateSource: { + serializedName: "properties.negateSource", + type: { + name: "String" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DestinationAddr" + } + }, + negateDestination: { + serializedName: "properties.negateDestination", + type: { + name: "String" + } + }, + applications: { + serializedName: "properties.applications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + category: { + serializedName: "properties.category", + type: { + name: "Composite", + className: "Category" + } + }, + protocol: { + defaultValue: "application-default", + serializedName: "properties.protocol", + type: { + name: "String" + } + }, + protocolPortList: { + serializedName: "properties.protocolPortList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + inboundInspectionCertificate: { + serializedName: "properties.inboundInspectionCertificate", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + actionType: { + serializedName: "properties.actionType", + type: { + name: "String" + } + }, + enableLogging: { + serializedName: "properties.enableLogging", + type: { + name: "String" + } + }, + decryptionRuleType: { + serializedName: "properties.decryptionRuleType", + type: { + name: "String" + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagInfo" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CertificateObjectLocalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateObjectLocalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + certificateSignerResourceId: { + serializedName: "properties.certificateSignerResourceId", + type: { + name: "String" + } + }, + certificateSelfSigned: { + serializedName: "properties.certificateSelfSigned", + required: true, + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FqdnListLocalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FqdnListLocalRulestackResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + fqdnList: { + serializedName: "properties.fqdnList", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const LocalRulesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulesResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "properties.ruleName", + required: true, + type: { + name: "String" + } + }, + priority: { + serializedName: "properties.priority", + readOnly: true, + type: { + name: "Number" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + ruleState: { + serializedName: "properties.ruleState", + type: { + name: "String" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "SourceAddr" + } + }, + negateSource: { + serializedName: "properties.negateSource", + type: { + name: "String" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DestinationAddr" + } + }, + negateDestination: { + serializedName: "properties.negateDestination", + type: { + name: "String" + } + }, + applications: { + serializedName: "properties.applications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + category: { + serializedName: "properties.category", + type: { + name: "Composite", + className: "Category" + } + }, + protocol: { + defaultValue: "application-default", + serializedName: "properties.protocol", + type: { + name: "String" + } + }, + protocolPortList: { + serializedName: "properties.protocolPortList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + inboundInspectionCertificate: { + serializedName: "properties.inboundInspectionCertificate", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + actionType: { + serializedName: "properties.actionType", + type: { + name: "String" + } + }, + enableLogging: { + serializedName: "properties.enableLogging", + type: { + name: "String" + } + }, + decryptionRuleType: { + serializedName: "properties.decryptionRuleType", + type: { + name: "String" + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagInfo" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrefixListResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrefixListResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + prefixList: { + serializedName: "properties.prefixList", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + etag: { + serializedName: "properties.etag", + type: { + name: "String" + } + }, + auditComment: { + serializedName: "properties.auditComment", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FirewallResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + panEtag: { + serializedName: "properties.panEtag", + type: { + name: "String" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + isPanoramaManaged: { + serializedName: "properties.isPanoramaManaged", + type: { + name: "String" + } + }, + panoramaConfig: { + serializedName: "properties.panoramaConfig", + type: { + name: "Composite", + className: "PanoramaConfig" + } + }, + associatedRulestack: { + serializedName: "properties.associatedRulestack", + type: { + name: "Composite", + className: "RulestackDetails" + } + }, + dnsSettings: { + serializedName: "properties.dnsSettings", + type: { + name: "Composite", + className: "DNSSettings" + } + }, + frontEndSettings: { + serializedName: "properties.frontEndSettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FrontendSetting" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + planData: { + serializedName: "properties.planData", + type: { + name: "Composite", + className: "PlanData" + } + }, + marketplaceDetails: { + serializedName: "properties.marketplaceDetails", + type: { + name: "Composite", + className: "MarketplaceDetails" + } + } + } + } +}; + +export const LocalRulestackResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalRulestackResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "AzureResourceManagerManagedIdentityProperties" + } + }, + panEtag: { + serializedName: "properties.panEtag", + type: { + name: "String" + } + }, + panLocation: { + serializedName: "properties.panLocation", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + associatedSubscriptions: { + serializedName: "properties.associatedSubscriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + defaultMode: { + serializedName: "properties.defaultMode", + type: { + name: "String" + } + }, + minAppIdVersion: { + serializedName: "properties.minAppIdVersion", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + securityServices: { + serializedName: "properties.securityServices", + type: { + name: "Composite", + className: "SecurityServices" + } + } + } + } +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/parameters.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/parameters.ts new file mode 100644 index 000000000000..2adcaa8f9cee --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/models/parameters.ts @@ -0,0 +1,337 @@ +/* + * 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 { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + GlobalRulestackResource as GlobalRulestackResourceMapper, + GlobalRulestackResourceUpdate as GlobalRulestackResourceUpdateMapper, + CertificateObjectGlobalRulestackResource as CertificateObjectGlobalRulestackResourceMapper, + FqdnListGlobalRulestackResource as FqdnListGlobalRulestackResourceMapper, + PostRulesResource as PostRulesResourceMapper, + PrefixListGlobalRulestackResource as PrefixListGlobalRulestackResourceMapper, + PreRulesResource as PreRulesResourceMapper, + FirewallResource as FirewallResourceMapper, + FirewallResourceUpdate as FirewallResourceUpdateMapper, + LogSettings as LogSettingsMapper, + LocalRulestackResource as LocalRulestackResourceMapper, + LocalRulestackResourceUpdate as LocalRulestackResourceUpdateMapper, + CertificateObjectLocalRulestackResource as CertificateObjectLocalRulestackResourceMapper, + FqdnListLocalRulestackResource as FqdnListLocalRulestackResourceMapper, + LocalRulesResource as LocalRulesResourceMapper, + PrefixListResource as PrefixListResourceMapper +} from "../models/mappers"; + +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 apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-08-29-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const globalRulestackName: OperationURLParameter = { + parameterPath: "globalRulestackName", + mapper: { + serializedName: "globalRulestackName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const resource: OperationParameter = { + parameterPath: "resource", + mapper: GlobalRulestackResourceMapper +}; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: GlobalRulestackResourceUpdateMapper +}; + +export const skip: OperationQueryParameter = { + parameterPath: ["options", "skip"], + mapper: { + serializedName: "skip", + type: { + name: "String" + } + } +}; + +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], + mapper: { + serializedName: "top", + type: { + name: "Number" + } + } +}; + +export const typeParam: OperationQueryParameter = { + parameterPath: "typeParam", + mapper: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } +}; + +export const appIdVersion: OperationQueryParameter = { + parameterPath: ["options", "appIdVersion"], + mapper: { + serializedName: "appIdVersion", + type: { + name: "String" + } + } +}; + +export const appPrefix: OperationQueryParameter = { + parameterPath: ["options", "appPrefix"], + mapper: { + serializedName: "appPrefix", + type: { + name: "String" + } + } +}; + +export const typeParam1: OperationQueryParameter = { + parameterPath: "typeParam", + mapper: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const name: OperationURLParameter = { + parameterPath: "name", + mapper: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } +}; + +export const resource1: OperationParameter = { + parameterPath: "resource", + mapper: CertificateObjectGlobalRulestackResourceMapper +}; + +export const resource2: OperationParameter = { + parameterPath: "resource", + mapper: FqdnListGlobalRulestackResourceMapper +}; + +export const priority: OperationURLParameter = { + parameterPath: "priority", + mapper: { + serializedName: "priority", + required: true, + type: { + name: "String" + } + } +}; + +export const resource3: OperationParameter = { + parameterPath: "resource", + mapper: PostRulesResourceMapper +}; + +export const firewallName: OperationQueryParameter = { + parameterPath: ["options", "firewallName"], + mapper: { + serializedName: "firewallName", + type: { + name: "String" + } + } +}; + +export const resource4: OperationParameter = { + parameterPath: "resource", + mapper: PrefixListGlobalRulestackResourceMapper +}; + +export const resource5: OperationParameter = { + parameterPath: "resource", + mapper: PreRulesResourceMapper +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const firewallName1: OperationURLParameter = { + parameterPath: "firewallName", + mapper: { + serializedName: "firewallName", + required: true, + type: { + name: "String" + } + } +}; + +export const resource6: OperationParameter = { + parameterPath: "resource", + mapper: FirewallResourceMapper +}; + +export const properties1: OperationParameter = { + parameterPath: "properties", + mapper: FirewallResourceUpdateMapper +}; + +export const email: OperationQueryParameter = { + parameterPath: ["options", "email"], + mapper: { + serializedName: "email", + type: { + name: "String" + } + } +}; + +export const logSettings: OperationParameter = { + parameterPath: ["options", "logSettings"], + mapper: LogSettingsMapper +}; + +export const localRulestackName: OperationURLParameter = { + parameterPath: "localRulestackName", + mapper: { + serializedName: "localRulestackName", + required: true, + type: { + name: "String" + } + } +}; + +export const resource7: OperationParameter = { + parameterPath: "resource", + mapper: LocalRulestackResourceMapper +}; + +export const properties2: OperationParameter = { + parameterPath: "properties", + mapper: LocalRulestackResourceUpdateMapper +}; + +export const resource8: OperationParameter = { + parameterPath: "resource", + mapper: CertificateObjectLocalRulestackResourceMapper +}; + +export const resource9: OperationParameter = { + parameterPath: "resource", + mapper: FqdnListLocalRulestackResourceMapper +}; + +export const resource10: OperationParameter = { + parameterPath: "resource", + mapper: LocalRulesResourceMapper +}; + +export const resource11: OperationParameter = { + parameterPath: "resource", + mapper: PrefixListResourceMapper +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectGlobalRulestack.ts new file mode 100644 index 000000000000..6d67d6ff72a4 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectGlobalRulestack.ts @@ -0,0 +1,451 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { CertificateObjectGlobalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + CertificateObjectGlobalRulestackResource, + CertificateObjectGlobalRulestackListNextOptionalParams, + CertificateObjectGlobalRulestackListOptionalParams, + CertificateObjectGlobalRulestackListResponse, + CertificateObjectGlobalRulestackGetOptionalParams, + CertificateObjectGlobalRulestackGetResponse, + CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams, + CertificateObjectGlobalRulestackCreateOrUpdateResponse, + CertificateObjectGlobalRulestackDeleteOptionalParams, + CertificateObjectGlobalRulestackListNextResponse +} from "../models"; + +/// +/** Class containing CertificateObjectGlobalRulestack operations. */ +export class CertificateObjectGlobalRulestackImpl + implements CertificateObjectGlobalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class CertificateObjectGlobalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + public list( + globalRulestackName: string, + options?: CertificateObjectGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(globalRulestackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(globalRulestackName, options, settings); + } + }; + } + + private async *listPagingPage( + globalRulestackName: string, + options?: CertificateObjectGlobalRulestackListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CertificateObjectGlobalRulestackListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(globalRulestackName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + globalRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + globalRulestackName: string, + options?: CertificateObjectGlobalRulestackListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + globalRulestackName, + options + )) { + yield* page; + } + } + + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + private _list( + globalRulestackName: string, + options?: CertificateObjectGlobalRulestackListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listOperationSpec + ); + } + + /** + * Get a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: CertificateObjectGlobalRulestackResource, + options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CertificateObjectGlobalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CertificateObjectGlobalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: CertificateObjectGlobalRulestackResource, + options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(globalRulestackName, name, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param globalRulestackName GlobalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + globalRulestackName: string, + nextLink: string, + options?: CertificateObjectGlobalRulestackListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResource + }, + 201: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResource + }, + 202: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResource + }, + 204: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectLocalRulestack.ts new file mode 100644 index 000000000000..eb00813d8751 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/certificateObjectLocalRulestack.ts @@ -0,0 +1,503 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { CertificateObjectLocalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + CertificateObjectLocalRulestackResource, + CertificateObjectLocalRulestackListByLocalRulestacksNextOptionalParams, + CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams, + CertificateObjectLocalRulestackListByLocalRulestacksResponse, + CertificateObjectLocalRulestackGetOptionalParams, + CertificateObjectLocalRulestackGetResponse, + CertificateObjectLocalRulestackCreateOrUpdateOptionalParams, + CertificateObjectLocalRulestackCreateOrUpdateResponse, + CertificateObjectLocalRulestackDeleteOptionalParams, + CertificateObjectLocalRulestackListByLocalRulestacksNextResponse +} from "../models"; + +/// +/** Class containing CertificateObjectLocalRulestack operations. */ +export class CertificateObjectLocalRulestackImpl + implements CertificateObjectLocalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class CertificateObjectLocalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + public listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocalRulestacksPagingAll( + resourceGroupName, + localRulestackName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options, + settings + ); + } + }; + } + + private async *listByLocalRulestacksPagingPage( + resourceGroupName: string, + localRulestackName: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CertificateObjectLocalRulestackListByLocalRulestacksResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocalRulestacks( + resourceGroupName, + localRulestackName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocalRulestacksNext( + resourceGroupName, + localRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocalRulestacksPagingAll( + resourceGroupName: string, + localRulestackName: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options + )) { + yield* page; + } + } + + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + private _listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listByLocalRulestacksOperationSpec + ); + } + + /** + * Get a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: CertificateObjectLocalRulestackResource, + options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CertificateObjectLocalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CertificateObjectLocalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: CertificateObjectLocalRulestackResource, + options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + localRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + localRulestackName, + name, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByLocalRulestacksNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the ListByLocalRulestacks method. + * @param options The options parameters. + */ + private _listByLocalRulestacksNext( + resourceGroupName: string, + localRulestackName: string, + nextLink: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, nextLink, options }, + listByLocalRulestacksNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocalRulestacksOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResource + }, + 201: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResource + }, + 202: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResource + }, + 204: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocalRulestacksNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateObjectLocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/firewalls.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/firewalls.ts new file mode 100644 index 000000000000..655cadb177c8 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/firewalls.ts @@ -0,0 +1,797 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Firewalls } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + FirewallResource, + FirewallsListBySubscriptionNextOptionalParams, + FirewallsListBySubscriptionOptionalParams, + FirewallsListBySubscriptionResponse, + FirewallsListByResourceGroupNextOptionalParams, + FirewallsListByResourceGroupOptionalParams, + FirewallsListByResourceGroupResponse, + FirewallsGetOptionalParams, + FirewallsGetResponse, + FirewallsCreateOrUpdateOptionalParams, + FirewallsCreateOrUpdateResponse, + FirewallResourceUpdate, + FirewallsUpdateOptionalParams, + FirewallsUpdateResponse, + FirewallsDeleteOptionalParams, + FirewallsGetGlobalRulestackOptionalParams, + FirewallsGetGlobalRulestackResponse, + FirewallsGetLogProfileOptionalParams, + FirewallsGetLogProfileResponse, + FirewallsGetSupportInfoOptionalParams, + FirewallsGetSupportInfoResponse, + FirewallsSaveLogProfileOptionalParams, + FirewallsListBySubscriptionNextResponse, + FirewallsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Firewalls operations. */ +export class FirewallsImpl implements Firewalls { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class Firewalls class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List FirewallResource resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: FirewallsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: FirewallsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FirewallsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: FirewallsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List FirewallResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: FirewallsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: FirewallsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FirewallsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: FirewallsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List FirewallResource resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: FirewallsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * List FirewallResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: FirewallsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, options }, + getOperationSpec + ); + } + + /** + * Create a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + firewallName: string, + resource: FirewallResource, + options?: FirewallsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FirewallsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, firewallName, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + FirewallsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + firewallName: string, + resource: FirewallResource, + options?: FirewallsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + firewallName, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + firewallName: string, + properties: FirewallResourceUpdate, + options?: FirewallsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, properties, options }, + updateOperationSpec + ); + } + + /** + * Delete a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + firewallName: string, + options?: FirewallsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, firewallName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + firewallName: string, + options?: FirewallsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + firewallName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get Global Rulestack associated with the Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getGlobalRulestack( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetGlobalRulestackOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, options }, + getGlobalRulestackOperationSpec + ); + } + + /** + * Log Profile for Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getLogProfile( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetLogProfileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, options }, + getLogProfileOperationSpec + ); + } + + /** + * support info for firewall. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getSupportInfo( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetSupportInfoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, options }, + getSupportInfoOperationSpec + ); + } + + /** + * Log Profile for Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + saveLogProfile( + resourceGroupName: string, + firewallName: string, + options?: FirewallsSaveLogProfileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, firewallName, options }, + saveLogProfileOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: FirewallsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: FirewallsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/firewalls", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirewallResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirewallResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirewallResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FirewallResource + }, + 201: { + bodyMapper: Mappers.FirewallResource + }, + 202: { + bodyMapper: Mappers.FirewallResource + }, + 204: { + bodyMapper: Mappers.FirewallResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.FirewallResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.properties1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getGlobalRulestackOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getGlobalRulestack", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackInfo + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getLogProfileOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getLogProfile", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LogSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getSupportInfoOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getSupportInfo", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SupportInfo + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.email], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const saveLogProfileOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/saveLogProfile", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.logSettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.firewallName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirewallResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirewallResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListGlobalRulestack.ts new file mode 100644 index 000000000000..680766456830 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListGlobalRulestack.ts @@ -0,0 +1,450 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { FqdnListGlobalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + FqdnListGlobalRulestackResource, + FqdnListGlobalRulestackListNextOptionalParams, + FqdnListGlobalRulestackListOptionalParams, + FqdnListGlobalRulestackListResponse, + FqdnListGlobalRulestackGetOptionalParams, + FqdnListGlobalRulestackGetResponse, + FqdnListGlobalRulestackCreateOrUpdateOptionalParams, + FqdnListGlobalRulestackCreateOrUpdateResponse, + FqdnListGlobalRulestackDeleteOptionalParams, + FqdnListGlobalRulestackListNextResponse +} from "../models"; + +/// +/** Class containing FqdnListGlobalRulestack operations. */ +export class FqdnListGlobalRulestackImpl implements FqdnListGlobalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class FqdnListGlobalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + public list( + globalRulestackName: string, + options?: FqdnListGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(globalRulestackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(globalRulestackName, options, settings); + } + }; + } + + private async *listPagingPage( + globalRulestackName: string, + options?: FqdnListGlobalRulestackListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FqdnListGlobalRulestackListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(globalRulestackName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + globalRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + globalRulestackName: string, + options?: FqdnListGlobalRulestackListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + globalRulestackName, + options + )) { + yield* page; + } + } + + /** + * List FqdnListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + private _list( + globalRulestackName: string, + options?: FqdnListGlobalRulestackListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listOperationSpec + ); + } + + /** + * Get a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: FqdnListGlobalRulestackResource, + options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FqdnListGlobalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + FqdnListGlobalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: FqdnListGlobalRulestackResource, + options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(globalRulestackName, name, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param globalRulestackName GlobalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + globalRulestackName: string, + nextLink: string, + options?: FqdnListGlobalRulestackListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FqdnListGlobalRulestackResource + }, + 201: { + bodyMapper: Mappers.FqdnListGlobalRulestackResource + }, + 202: { + bodyMapper: Mappers.FqdnListGlobalRulestackResource + }, + 204: { + bodyMapper: Mappers.FqdnListGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListLocalRulestack.ts new file mode 100644 index 000000000000..f5807406022c --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/fqdnListLocalRulestack.ts @@ -0,0 +1,502 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { FqdnListLocalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + FqdnListLocalRulestackResource, + FqdnListLocalRulestackListByLocalRulestacksNextOptionalParams, + FqdnListLocalRulestackListByLocalRulestacksOptionalParams, + FqdnListLocalRulestackListByLocalRulestacksResponse, + FqdnListLocalRulestackGetOptionalParams, + FqdnListLocalRulestackGetResponse, + FqdnListLocalRulestackCreateOrUpdateOptionalParams, + FqdnListLocalRulestackCreateOrUpdateResponse, + FqdnListLocalRulestackDeleteOptionalParams, + FqdnListLocalRulestackListByLocalRulestacksNextResponse +} from "../models"; + +/// +/** Class containing FqdnListLocalRulestack operations. */ +export class FqdnListLocalRulestackImpl implements FqdnListLocalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class FqdnListLocalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + public listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocalRulestacksPagingAll( + resourceGroupName, + localRulestackName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options, + settings + ); + } + }; + } + + private async *listByLocalRulestacksPagingPage( + resourceGroupName: string, + localRulestackName: string, + options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FqdnListLocalRulestackListByLocalRulestacksResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocalRulestacks( + resourceGroupName, + localRulestackName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocalRulestacksNext( + resourceGroupName, + localRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocalRulestacksPagingAll( + resourceGroupName: string, + localRulestackName: string, + options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options + )) { + yield* page; + } + } + + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + private _listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listByLocalRulestacksOperationSpec + ); + } + + /** + * Get a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: FqdnListLocalRulestackResource, + options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FqdnListLocalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + FqdnListLocalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: FqdnListLocalRulestackResource, + options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + localRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + localRulestackName, + name, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByLocalRulestacksNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the ListByLocalRulestacks method. + * @param options The options parameters. + */ + private _listByLocalRulestacksNext( + resourceGroupName: string, + localRulestackName: string, + nextLink: string, + options?: FqdnListLocalRulestackListByLocalRulestacksNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, nextLink, options }, + listByLocalRulestacksNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocalRulestacksOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListLocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListLocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FqdnListLocalRulestackResource + }, + 201: { + bodyMapper: Mappers.FqdnListLocalRulestackResource + }, + 202: { + bodyMapper: Mappers.FqdnListLocalRulestackResource + }, + 204: { + bodyMapper: Mappers.FqdnListLocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocalRulestacksNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FqdnListLocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/globalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/globalRulestack.ts new file mode 100644 index 000000000000..d83ed7f10786 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/globalRulestack.ts @@ -0,0 +1,828 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { GlobalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GlobalRulestackResource, + GlobalRulestackListNextOptionalParams, + GlobalRulestackListOptionalParams, + GlobalRulestackListResponse, + GlobalRulestackGetOptionalParams, + GlobalRulestackGetResponse, + GlobalRulestackCreateOrUpdateOptionalParams, + GlobalRulestackCreateOrUpdateResponse, + GlobalRulestackResourceUpdate, + GlobalRulestackUpdateOptionalParams, + GlobalRulestackUpdateResponse, + GlobalRulestackDeleteOptionalParams, + GlobalRulestackCommitOptionalParams, + GlobalRulestackGetChangeLogOptionalParams, + GlobalRulestackGetChangeLogResponse, + AdvSecurityObjectTypeEnum, + GlobalRulestackListAdvancedSecurityObjectsOptionalParams, + GlobalRulestackListAdvancedSecurityObjectsResponse, + GlobalRulestackListAppIdsOptionalParams, + GlobalRulestackListAppIdsResponse, + GlobalRulestackListCountriesOptionalParams, + GlobalRulestackListCountriesResponse, + GlobalRulestackListFirewallsOptionalParams, + GlobalRulestackListFirewallsResponse, + GlobalRulestackListPredefinedUrlCategoriesOptionalParams, + GlobalRulestackListPredefinedUrlCategoriesResponse, + SecurityServicesTypeEnum, + GlobalRulestackListSecurityServicesOptionalParams, + GlobalRulestackListSecurityServicesResponse, + GlobalRulestackRevertOptionalParams, + GlobalRulestackListNextResponse +} from "../models"; + +/// +/** Class containing GlobalRulestack operations. */ +export class GlobalRulestackImpl implements GlobalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class GlobalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List GlobalRulestackResource resources by Tenant + * @param options The options parameters. + */ + public list( + options?: GlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: GlobalRulestackListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GlobalRulestackListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: GlobalRulestackListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List GlobalRulestackResource resources by Tenant + * @param options The options parameters. + */ + private _list( + options?: GlobalRulestackListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + options?: GlobalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + getOperationSpec + ); + } + + /** + * Create a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + resource: GlobalRulestackResource, + options?: GlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GlobalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + resource: GlobalRulestackResource, + options?: GlobalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + globalRulestackName: string, + properties: GlobalRulestackResourceUpdate, + options?: GlobalRulestackUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, properties, options }, + updateOperationSpec + ); + } + + /** + * Delete a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + options?: GlobalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + options?: GlobalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(globalRulestackName, options); + return poller.pollUntilDone(); + } + + /** + * Commit rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + async beginCommit( + globalRulestackName: string, + options?: GlobalRulestackCommitOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, options }, + spec: commitOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Commit rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + async beginCommitAndWait( + globalRulestackName: string, + options?: GlobalRulestackCommitOptionalParams + ): Promise { + const poller = await this.beginCommit(globalRulestackName, options); + return poller.pollUntilDone(); + } + + /** + * Get changelog + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + getChangeLog( + globalRulestackName: string, + options?: GlobalRulestackGetChangeLogOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + getChangeLogOperationSpec + ); + } + + /** + * Get the list of advanced security objects + * @param globalRulestackName GlobalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listAdvancedSecurityObjects( + globalRulestackName: string, + typeParam: AdvSecurityObjectTypeEnum, + options?: GlobalRulestackListAdvancedSecurityObjectsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, typeParam, options }, + listAdvancedSecurityObjectsOperationSpec + ); + } + + /** + * List of AppIds for GlobalRulestack ApiVersion + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listAppIds( + globalRulestackName: string, + options?: GlobalRulestackListAppIdsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listAppIdsOperationSpec + ); + } + + /** + * List of countries for Rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listCountries( + globalRulestackName: string, + options?: GlobalRulestackListCountriesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listCountriesOperationSpec + ); + } + + /** + * List of Firewalls associated with Rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listFirewalls( + globalRulestackName: string, + options?: GlobalRulestackListFirewallsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listFirewallsOperationSpec + ); + } + + /** + * List predefined URL categories for rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listPredefinedUrlCategories( + globalRulestackName: string, + options?: GlobalRulestackListPredefinedUrlCategoriesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listPredefinedUrlCategoriesOperationSpec + ); + } + + /** + * List the security services for rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listSecurityServices( + globalRulestackName: string, + typeParam: SecurityServicesTypeEnum, + options?: GlobalRulestackListSecurityServicesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, typeParam, options }, + listSecurityServicesOperationSpec + ); + } + + /** + * Revert rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + revert( + globalRulestackName: string, + options?: GlobalRulestackRevertOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + revertOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: GlobalRulestackListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackResource + }, + 201: { + bodyMapper: Mappers.GlobalRulestackResource + }, + 202: { + bodyMapper: Mappers.GlobalRulestackResource + }, + 204: { + bodyMapper: Mappers.GlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const commitOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/commit", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getChangeLogOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/getChangeLog", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Changelog + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listAdvancedSecurityObjectsOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAdvancedSecurityObjects", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AdvSecurityObjectListResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.typeParam + ], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listAppIdsOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAppIds", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListAppIdResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.appIdVersion, + Parameters.appPrefix + ], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listCountriesOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listCountries", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CountriesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listFirewallsOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listFirewalls", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListFirewallsResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listPredefinedUrlCategoriesOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listPredefinedUrlCategories", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PredefinedUrlCategoriesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listSecurityServicesOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listSecurityServices", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SecurityServicesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.typeParam1 + ], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const revertOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/revert", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/index.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/index.ts new file mode 100644 index 000000000000..ff53ec788230 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/index.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./globalRulestack"; +export * from "./certificateObjectGlobalRulestack"; +export * from "./fqdnListGlobalRulestack"; +export * from "./postRules"; +export * from "./prefixListGlobalRulestack"; +export * from "./preRules"; +export * from "./operations"; +export * from "./firewalls"; +export * from "./localRulestacks"; +export * from "./certificateObjectLocalRulestack"; +export * from "./fqdnListLocalRulestack"; +export * from "./localRules"; +export * from "./prefixListLocalRulestack"; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRules.ts new file mode 100644 index 000000000000..4efa62d72ea0 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRules.ts @@ -0,0 +1,637 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { LocalRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + LocalRulesResource, + LocalRulesListByLocalRulestacksNextOptionalParams, + LocalRulesListByLocalRulestacksOptionalParams, + LocalRulesListByLocalRulestacksResponse, + LocalRulesGetOptionalParams, + LocalRulesGetResponse, + LocalRulesCreateOrUpdateOptionalParams, + LocalRulesCreateOrUpdateResponse, + LocalRulesDeleteOptionalParams, + LocalRulesGetCountersOptionalParams, + LocalRulesGetCountersResponse, + LocalRulesRefreshCountersOptionalParams, + LocalRulesResetCountersOptionalParams, + LocalRulesResetCountersResponse, + LocalRulesListByLocalRulestacksNextResponse +} from "../models"; + +/// +/** Class containing LocalRules operations. */ +export class LocalRulesImpl implements LocalRules { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class LocalRules class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List LocalRulesResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + public listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulesListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocalRulestacksPagingAll( + resourceGroupName, + localRulestackName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options, + settings + ); + } + }; + } + + private async *listByLocalRulestacksPagingPage( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulesListByLocalRulestacksOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LocalRulesListByLocalRulestacksResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocalRulestacks( + resourceGroupName, + localRulestackName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocalRulestacksNext( + resourceGroupName, + localRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocalRulestacksPagingAll( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulesListByLocalRulestacksOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options + )) { + yield* page; + } + } + + /** + * List LocalRulesResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + private _listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulesListByLocalRulestacksOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listByLocalRulestacksOperationSpec + ); + } + + /** + * Get a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, priority, options }, + getOperationSpec + ); + } + + /** + * Create a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + priority: string, + resource: LocalRulesResource, + options?: LocalRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LocalRulesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + localRulestackName, + priority, + resource, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LocalRulesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + priority: string, + resource: LocalRulesResource, + options?: LocalRulesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + localRulestackName, + priority, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, priority, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + localRulestackName, + priority, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + getCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesGetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, priority, options }, + getCountersOperationSpec + ); + } + + /** + * Refresh counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + refreshCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesRefreshCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, priority, options }, + refreshCountersOperationSpec + ); + } + + /** + * Reset counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + resetCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesResetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, priority, options }, + resetCountersOperationSpec + ); + } + + /** + * ListByLocalRulestacksNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the ListByLocalRulestacks method. + * @param options The options parameters. + */ + private _listByLocalRulestacksNext( + resourceGroupName: string, + localRulestackName: string, + nextLink: string, + options?: LocalRulesListByLocalRulestacksNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, nextLink, options }, + listByLocalRulestacksNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocalRulestacksOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LocalRulesResource + }, + 201: { + bodyMapper: Mappers.LocalRulesResource + }, + 202: { + bodyMapper: Mappers.LocalRulesResource + }, + 204: { + bodyMapper: Mappers.LocalRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getCountersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/getCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounter + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const refreshCountersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/refreshCounters", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const resetCountersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/resetCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounterReset + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.priority, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocalRulestacksNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRulestacks.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRulestacks.ts new file mode 100644 index 000000000000..728e6dd89aab --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/localRulestacks.ts @@ -0,0 +1,1129 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { LocalRulestacks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + LocalRulestackResource, + LocalRulestacksListBySubscriptionNextOptionalParams, + LocalRulestacksListBySubscriptionOptionalParams, + LocalRulestacksListBySubscriptionResponse, + LocalRulestacksListByResourceGroupNextOptionalParams, + LocalRulestacksListByResourceGroupOptionalParams, + LocalRulestacksListByResourceGroupResponse, + LocalRulestacksGetOptionalParams, + LocalRulestacksGetResponse, + LocalRulestacksCreateOrUpdateOptionalParams, + LocalRulestacksCreateOrUpdateResponse, + LocalRulestackResourceUpdate, + LocalRulestacksUpdateOptionalParams, + LocalRulestacksUpdateResponse, + LocalRulestacksDeleteOptionalParams, + LocalRulestacksCommitOptionalParams, + LocalRulestacksGetChangeLogOptionalParams, + LocalRulestacksGetChangeLogResponse, + LocalRulestacksGetSupportInfoOptionalParams, + LocalRulestacksGetSupportInfoResponse, + AdvSecurityObjectTypeEnum, + LocalRulestacksListAdvancedSecurityObjectsOptionalParams, + LocalRulestacksListAdvancedSecurityObjectsResponse, + LocalRulestacksListAppIdsOptionalParams, + LocalRulestacksListAppIdsResponse, + LocalRulestacksListCountriesOptionalParams, + LocalRulestacksListCountriesResponse, + LocalRulestacksListFirewallsOptionalParams, + LocalRulestacksListFirewallsResponse, + LocalRulestacksListPredefinedUrlCategoriesOptionalParams, + LocalRulestacksListPredefinedUrlCategoriesResponse, + SecurityServicesTypeEnum, + LocalRulestacksListSecurityServicesOptionalParams, + LocalRulestacksListSecurityServicesResponse, + LocalRulestacksRevertOptionalParams, + LocalRulestacksListBySubscriptionNextResponse, + LocalRulestacksListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing LocalRulestacks operations. */ +export class LocalRulestacksImpl implements LocalRulestacks { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class LocalRulestacks class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List LocalRulestackResource resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: LocalRulestacksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: LocalRulestacksListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LocalRulestacksListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: LocalRulestacksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List LocalRulestackResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: LocalRulestacksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: LocalRulestacksListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LocalRulestacksListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: LocalRulestacksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List LocalRulestackResource resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: LocalRulestacksListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * List LocalRulestackResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: LocalRulestacksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + getOperationSpec + ); + } + + /** + * Create a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + resource: LocalRulestackResource, + options?: LocalRulestacksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LocalRulestacksCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + LocalRulestacksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + resource: LocalRulestackResource, + options?: LocalRulestacksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + localRulestackName, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + localRulestackName: string, + properties: LocalRulestackResourceUpdate, + options?: LocalRulestacksUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, properties, options }, + updateOperationSpec + ); + } + + /** + * Delete a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + localRulestackName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Commit rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + async beginCommit( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksCommitOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, options }, + spec: commitOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Commit rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + async beginCommitAndWait( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksCommitOptionalParams + ): Promise { + const poller = await this.beginCommit( + resourceGroupName, + localRulestackName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get changelog + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + getChangeLog( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetChangeLogOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + getChangeLogOperationSpec + ); + } + + /** + * support info for rulestack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + getSupportInfo( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetSupportInfoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + getSupportInfoOperationSpec + ); + } + + /** + * Get the list of advanced security objects + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listAdvancedSecurityObjects( + resourceGroupName: string, + localRulestackName: string, + typeParam: AdvSecurityObjectTypeEnum, + options?: LocalRulestacksListAdvancedSecurityObjectsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, typeParam, options }, + listAdvancedSecurityObjectsOperationSpec + ); + } + + /** + * List of AppIds for LocalRulestack ApiVersion + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listAppIds( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListAppIdsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listAppIdsOperationSpec + ); + } + + /** + * List of countries for Rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listCountries( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListCountriesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listCountriesOperationSpec + ); + } + + /** + * List of Firewalls associated with Rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listFirewalls( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListFirewallsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listFirewallsOperationSpec + ); + } + + /** + * List predefined URL categories for rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listPredefinedUrlCategories( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListPredefinedUrlCategoriesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listPredefinedUrlCategoriesOperationSpec + ); + } + + /** + * List the security services for rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listSecurityServices( + resourceGroupName: string, + localRulestackName: string, + typeParam: SecurityServicesTypeEnum, + options?: LocalRulestacksListSecurityServicesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, typeParam, options }, + listSecurityServicesOperationSpec + ); + } + + /** + * Revert rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + revert( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksRevertOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + revertOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: LocalRulestacksListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: LocalRulestacksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResource + }, + 201: { + bodyMapper: Mappers.LocalRulestackResource + }, + 202: { + bodyMapper: Mappers.LocalRulestackResource + }, + 204: { + bodyMapper: Mappers.LocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.properties2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const commitOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/commit", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getChangeLogOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getChangeLog", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Changelog + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getSupportInfoOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getSupportInfo", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SupportInfo + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.email], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAdvancedSecurityObjectsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAdvancedSecurityObjects", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AdvSecurityObjectListResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.typeParam + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listAppIdsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAppIds", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListAppIdResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.appIdVersion, + Parameters.appPrefix + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listCountriesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listCountries", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CountriesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listFirewallsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listFirewalls", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ListFirewallsResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listPredefinedUrlCategoriesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listPredefinedUrlCategories", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PredefinedUrlCategoriesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listSecurityServicesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listSecurityServices", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SecurityServicesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top, + Parameters.typeParam1 + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const revertOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/revert", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LocalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/operations.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/operations.ts new file mode 100644 index 000000000000..5de350b4f549 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List the operations for the provider + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List the operations for the provider + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/PaloAltoNetworks.Cloudngfw/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/postRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/postRules.ts new file mode 100644 index 000000000000..77d2924a5620 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/postRules.ts @@ -0,0 +1,571 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { PostRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PostRulesResource, + PostRulesListNextOptionalParams, + PostRulesListOptionalParams, + PostRulesListResponse, + PostRulesGetOptionalParams, + PostRulesGetResponse, + PostRulesCreateOrUpdateOptionalParams, + PostRulesCreateOrUpdateResponse, + PostRulesDeleteOptionalParams, + PostRulesGetCountersOptionalParams, + PostRulesGetCountersResponse, + PostRulesRefreshCountersOptionalParams, + PostRulesResetCountersOptionalParams, + PostRulesResetCountersResponse, + PostRulesListNextResponse +} from "../models"; + +/// +/** Class containing PostRules operations. */ +export class PostRulesImpl implements PostRules { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class PostRules class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List PostRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + public list( + globalRulestackName: string, + options?: PostRulesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(globalRulestackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(globalRulestackName, options, settings); + } + }; + } + + private async *listPagingPage( + globalRulestackName: string, + options?: PostRulesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PostRulesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(globalRulestackName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + globalRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + globalRulestackName: string, + options?: PostRulesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + globalRulestackName, + options + )) { + yield* page; + } + } + + /** + * List PostRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + private _list( + globalRulestackName: string, + options?: PostRulesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listOperationSpec + ); + } + + /** + * Get a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + priority: string, + options?: PostRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + getOperationSpec + ); + } + + /** + * Create a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + priority: string, + resource: PostRulesResource, + options?: PostRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PostRulesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, priority, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PostRulesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + priority: string, + resource: PostRulesResource, + options?: PostRulesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + priority, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + priority: string, + options?: PostRulesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, priority, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + priority: string, + options?: PostRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + globalRulestackName, + priority, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + getCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesGetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + getCountersOperationSpec + ); + } + + /** + * Refresh counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + refreshCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesRefreshCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + refreshCountersOperationSpec + ); + } + + /** + * Reset counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + resetCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesResetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + resetCountersOperationSpec + ); + } + + /** + * ListNext + * @param globalRulestackName GlobalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + globalRulestackName: string, + nextLink: string, + options?: PostRulesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PostRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PostRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PostRulesResource + }, + 201: { + bodyMapper: Mappers.PostRulesResource + }, + 202: { + bodyMapper: Mappers.PostRulesResource + }, + 204: { + bodyMapper: Mappers.PostRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const getCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/getCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounter + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const refreshCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/refreshCounters", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const resetCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/resetCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounterReset + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PostRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/preRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/preRules.ts new file mode 100644 index 000000000000..8207bea96851 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/preRules.ts @@ -0,0 +1,571 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { PreRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PreRulesResource, + PreRulesListNextOptionalParams, + PreRulesListOptionalParams, + PreRulesListResponse, + PreRulesGetOptionalParams, + PreRulesGetResponse, + PreRulesCreateOrUpdateOptionalParams, + PreRulesCreateOrUpdateResponse, + PreRulesDeleteOptionalParams, + PreRulesGetCountersOptionalParams, + PreRulesGetCountersResponse, + PreRulesRefreshCountersOptionalParams, + PreRulesResetCountersOptionalParams, + PreRulesResetCountersResponse, + PreRulesListNextResponse +} from "../models"; + +/// +/** Class containing PreRules operations. */ +export class PreRulesImpl implements PreRules { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class PreRules class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List PreRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + public list( + globalRulestackName: string, + options?: PreRulesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(globalRulestackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(globalRulestackName, options, settings); + } + }; + } + + private async *listPagingPage( + globalRulestackName: string, + options?: PreRulesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PreRulesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(globalRulestackName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + globalRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + globalRulestackName: string, + options?: PreRulesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + globalRulestackName, + options + )) { + yield* page; + } + } + + /** + * List PreRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + private _list( + globalRulestackName: string, + options?: PreRulesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listOperationSpec + ); + } + + /** + * Get a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + priority: string, + options?: PreRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + getOperationSpec + ); + } + + /** + * Create a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + priority: string, + resource: PreRulesResource, + options?: PreRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PreRulesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, priority, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PreRulesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + priority: string, + resource: PreRulesResource, + options?: PreRulesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + priority, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + priority: string, + options?: PreRulesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, priority, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + priority: string, + options?: PreRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + globalRulestackName, + priority, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + getCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesGetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + getCountersOperationSpec + ); + } + + /** + * Refresh counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + refreshCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesRefreshCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + refreshCountersOperationSpec + ); + } + + /** + * Reset counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + resetCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesResetCountersOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, priority, options }, + resetCountersOperationSpec + ); + } + + /** + * ListNext + * @param globalRulestackName GlobalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + globalRulestackName: string, + nextLink: string, + options?: PreRulesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PreRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PreRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PreRulesResource + }, + 201: { + bodyMapper: Mappers.PreRulesResource + }, + 202: { + bodyMapper: Mappers.PreRulesResource + }, + 204: { + bodyMapper: Mappers.PreRulesResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const getCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounter + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const refreshCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const resetCountersOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.RuleCounterReset + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.firewallName], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.priority + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PreRulesResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListGlobalRulestack.ts new file mode 100644 index 000000000000..47a0fea61513 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListGlobalRulestack.ts @@ -0,0 +1,451 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { PrefixListGlobalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PrefixListGlobalRulestackResource, + PrefixListGlobalRulestackListNextOptionalParams, + PrefixListGlobalRulestackListOptionalParams, + PrefixListGlobalRulestackListResponse, + PrefixListGlobalRulestackGetOptionalParams, + PrefixListGlobalRulestackGetResponse, + PrefixListGlobalRulestackCreateOrUpdateOptionalParams, + PrefixListGlobalRulestackCreateOrUpdateResponse, + PrefixListGlobalRulestackDeleteOptionalParams, + PrefixListGlobalRulestackListNextResponse +} from "../models"; + +/// +/** Class containing PrefixListGlobalRulestack operations. */ +export class PrefixListGlobalRulestackImpl + implements PrefixListGlobalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class PrefixListGlobalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + public list( + globalRulestackName: string, + options?: PrefixListGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(globalRulestackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(globalRulestackName, options, settings); + } + }; + } + + private async *listPagingPage( + globalRulestackName: string, + options?: PrefixListGlobalRulestackListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PrefixListGlobalRulestackListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(globalRulestackName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + globalRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + globalRulestackName: string, + options?: PrefixListGlobalRulestackListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + globalRulestackName, + options + )) { + yield* page; + } + } + + /** + * List PrefixListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + private _list( + globalRulestackName: string, + options?: PrefixListGlobalRulestackListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, options }, + listOperationSpec + ); + } + + /** + * Get a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: PrefixListGlobalRulestackResource, + options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrefixListGlobalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrefixListGlobalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: PrefixListGlobalRulestackResource, + options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + globalRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + async beginDelete( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { globalRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + async beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(globalRulestackName, name, options); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param globalRulestackName GlobalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + globalRulestackName: string, + nextLink: string, + options?: PrefixListGlobalRulestackListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { globalRulestackName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.globalRulestackName], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrefixListGlobalRulestackResource + }, + 201: { + bodyMapper: Mappers.PrefixListGlobalRulestackResource + }, + 202: { + bodyMapper: Mappers.PrefixListGlobalRulestackResource + }, + 204: { + bodyMapper: Mappers.PrefixListGlobalRulestackResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListGlobalRulestackResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.globalRulestackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListLocalRulestack.ts new file mode 100644 index 000000000000..bf317a333414 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operations/prefixListLocalRulestack.ts @@ -0,0 +1,502 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { PrefixListLocalRulestack } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { PaloAltoNetworksCloudngfw } from "../paloAltoNetworksCloudngfw"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PrefixListResource, + PrefixListLocalRulestackListByLocalRulestacksNextOptionalParams, + PrefixListLocalRulestackListByLocalRulestacksOptionalParams, + PrefixListLocalRulestackListByLocalRulestacksResponse, + PrefixListLocalRulestackGetOptionalParams, + PrefixListLocalRulestackGetResponse, + PrefixListLocalRulestackCreateOrUpdateOptionalParams, + PrefixListLocalRulestackCreateOrUpdateResponse, + PrefixListLocalRulestackDeleteOptionalParams, + PrefixListLocalRulestackListByLocalRulestacksNextResponse +} from "../models"; + +/// +/** Class containing PrefixListLocalRulestack operations. */ +export class PrefixListLocalRulestackImpl implements PrefixListLocalRulestack { + private readonly client: PaloAltoNetworksCloudngfw; + + /** + * Initialize a new instance of the class PrefixListLocalRulestack class. + * @param client Reference to the service client + */ + constructor(client: PaloAltoNetworksCloudngfw) { + this.client = client; + } + + /** + * List PrefixListResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + public listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocalRulestacksPagingAll( + resourceGroupName, + localRulestackName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options, + settings + ); + } + }; + } + + private async *listByLocalRulestacksPagingPage( + resourceGroupName: string, + localRulestackName: string, + options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PrefixListLocalRulestackListByLocalRulestacksResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocalRulestacks( + resourceGroupName, + localRulestackName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocalRulestacksNext( + resourceGroupName, + localRulestackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocalRulestacksPagingAll( + resourceGroupName: string, + localRulestackName: string, + options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocalRulestacksPagingPage( + resourceGroupName, + localRulestackName, + options + )) { + yield* page; + } + } + + /** + * List PrefixListResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + private _listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, options }, + listByLocalRulestacksOperationSpec + ); + } + + /** + * Get a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, name, options }, + getOperationSpec + ); + } + + /** + * Create a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: PrefixListResource, + options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrefixListLocalRulestackCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrefixListLocalRulestackCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: PrefixListResource, + options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + localRulestackName, + name, + resource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, localRulestackName, name, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + localRulestackName, + name, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByLocalRulestacksNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param nextLink The nextLink from the previous successful call to the ListByLocalRulestacks method. + * @param options The options parameters. + */ + private _listByLocalRulestacksNext( + resourceGroupName: string, + localRulestackName: string, + nextLink: string, + options?: PrefixListLocalRulestackListByLocalRulestacksNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, localRulestackName, nextLink, options }, + listByLocalRulestacksNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocalRulestacksOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrefixListResource + }, + 201: { + bodyMapper: Mappers.PrefixListResource + }, + 202: { + bodyMapper: Mappers.PrefixListResource + }, + 204: { + bodyMapper: Mappers.PrefixListResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resource11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocalRulestacksNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrefixListResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.localRulestackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectGlobalRulestack.ts new file mode 100644 index 000000000000..438f6e92a2fd --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectGlobalRulestack.ts @@ -0,0 +1,97 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + CertificateObjectGlobalRulestackResource, + CertificateObjectGlobalRulestackListOptionalParams, + CertificateObjectGlobalRulestackGetOptionalParams, + CertificateObjectGlobalRulestackGetResponse, + CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams, + CertificateObjectGlobalRulestackCreateOrUpdateResponse, + CertificateObjectGlobalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a CertificateObjectGlobalRulestack. */ +export interface CertificateObjectGlobalRulestack { + /** + * List CertificateObjectGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + list( + globalRulestackName: string, + options?: CertificateObjectGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackGetOptionalParams + ): Promise; + /** + * Create a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: CertificateObjectGlobalRulestackResource, + options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CertificateObjectGlobalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: CertificateObjectGlobalRulestackResource, + options?: CertificateObjectGlobalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a CertificateObjectGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: CertificateObjectGlobalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectLocalRulestack.ts new file mode 100644 index 000000000000..9cd41afedc30 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/certificateObjectLocalRulestack.ts @@ -0,0 +1,109 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + CertificateObjectLocalRulestackResource, + CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams, + CertificateObjectLocalRulestackGetOptionalParams, + CertificateObjectLocalRulestackGetResponse, + CertificateObjectLocalRulestackCreateOrUpdateOptionalParams, + CertificateObjectLocalRulestackCreateOrUpdateResponse, + CertificateObjectLocalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a CertificateObjectLocalRulestack. */ +export interface CertificateObjectLocalRulestack { + /** + * List CertificateObjectLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: CertificateObjectLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackGetOptionalParams + ): Promise; + /** + * Create a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: CertificateObjectLocalRulestackResource, + options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CertificateObjectLocalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: CertificateObjectLocalRulestackResource, + options?: CertificateObjectLocalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a CertificateObjectLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name certificate name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: CertificateObjectLocalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/firewalls.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/firewalls.ts new file mode 100644 index 000000000000..41a0789a2ef7 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/firewalls.ts @@ -0,0 +1,172 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + FirewallResource, + FirewallsListBySubscriptionOptionalParams, + FirewallsListByResourceGroupOptionalParams, + FirewallsGetOptionalParams, + FirewallsGetResponse, + FirewallsCreateOrUpdateOptionalParams, + FirewallsCreateOrUpdateResponse, + FirewallResourceUpdate, + FirewallsUpdateOptionalParams, + FirewallsUpdateResponse, + FirewallsDeleteOptionalParams, + FirewallsGetGlobalRulestackOptionalParams, + FirewallsGetGlobalRulestackResponse, + FirewallsGetLogProfileOptionalParams, + FirewallsGetLogProfileResponse, + FirewallsGetSupportInfoOptionalParams, + FirewallsGetSupportInfoResponse, + FirewallsSaveLogProfileOptionalParams +} from "../models"; + +/// +/** Interface representing a Firewalls. */ +export interface Firewalls { + /** + * List FirewallResource resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: FirewallsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List FirewallResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: FirewallsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetOptionalParams + ): Promise; + /** + * Create a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + firewallName: string, + resource: FirewallResource, + options?: FirewallsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FirewallsCreateOrUpdateResponse + > + >; + /** + * Create a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + firewallName: string, + resource: FirewallResource, + options?: FirewallsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + firewallName: string, + properties: FirewallResourceUpdate, + options?: FirewallsUpdateOptionalParams + ): Promise; + /** + * Delete a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + firewallName: string, + options?: FirewallsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a FirewallResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + firewallName: string, + options?: FirewallsDeleteOptionalParams + ): Promise; + /** + * Get Global Rulestack associated with the Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getGlobalRulestack( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetGlobalRulestackOptionalParams + ): Promise; + /** + * Log Profile for Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getLogProfile( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetLogProfileOptionalParams + ): Promise; + /** + * support info for firewall. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + getSupportInfo( + resourceGroupName: string, + firewallName: string, + options?: FirewallsGetSupportInfoOptionalParams + ): Promise; + /** + * Log Profile for Firewall + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param firewallName Firewall resource name + * @param options The options parameters. + */ + saveLogProfile( + resourceGroupName: string, + firewallName: string, + options?: FirewallsSaveLogProfileOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListGlobalRulestack.ts new file mode 100644 index 000000000000..56971e107ca3 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListGlobalRulestack.ts @@ -0,0 +1,97 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + FqdnListGlobalRulestackResource, + FqdnListGlobalRulestackListOptionalParams, + FqdnListGlobalRulestackGetOptionalParams, + FqdnListGlobalRulestackGetResponse, + FqdnListGlobalRulestackCreateOrUpdateOptionalParams, + FqdnListGlobalRulestackCreateOrUpdateResponse, + FqdnListGlobalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a FqdnListGlobalRulestack. */ +export interface FqdnListGlobalRulestack { + /** + * List FqdnListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + list( + globalRulestackName: string, + options?: FqdnListGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackGetOptionalParams + ): Promise; + /** + * Create a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: FqdnListGlobalRulestackResource, + options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FqdnListGlobalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: FqdnListGlobalRulestackResource, + options?: FqdnListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a FqdnListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: FqdnListGlobalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListLocalRulestack.ts new file mode 100644 index 000000000000..f7bd5d9e9994 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/fqdnListLocalRulestack.ts @@ -0,0 +1,109 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + FqdnListLocalRulestackResource, + FqdnListLocalRulestackListByLocalRulestacksOptionalParams, + FqdnListLocalRulestackGetOptionalParams, + FqdnListLocalRulestackGetResponse, + FqdnListLocalRulestackCreateOrUpdateOptionalParams, + FqdnListLocalRulestackCreateOrUpdateResponse, + FqdnListLocalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a FqdnListLocalRulestack. */ +export interface FqdnListLocalRulestack { + /** + * List FqdnListLocalRulestackResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: FqdnListLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackGetOptionalParams + ): Promise; + /** + * Create a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: FqdnListLocalRulestackResource, + options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + FqdnListLocalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: FqdnListLocalRulestackResource, + options?: FqdnListLocalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a FqdnListLocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name fqdn list name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: FqdnListLocalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/globalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/globalRulestack.ts new file mode 100644 index 000000000000..138ca2ac5daa --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/globalRulestack.ts @@ -0,0 +1,211 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GlobalRulestackResource, + GlobalRulestackListOptionalParams, + GlobalRulestackGetOptionalParams, + GlobalRulestackGetResponse, + GlobalRulestackCreateOrUpdateOptionalParams, + GlobalRulestackCreateOrUpdateResponse, + GlobalRulestackResourceUpdate, + GlobalRulestackUpdateOptionalParams, + GlobalRulestackUpdateResponse, + GlobalRulestackDeleteOptionalParams, + GlobalRulestackCommitOptionalParams, + GlobalRulestackGetChangeLogOptionalParams, + GlobalRulestackGetChangeLogResponse, + AdvSecurityObjectTypeEnum, + GlobalRulestackListAdvancedSecurityObjectsOptionalParams, + GlobalRulestackListAdvancedSecurityObjectsResponse, + GlobalRulestackListAppIdsOptionalParams, + GlobalRulestackListAppIdsResponse, + GlobalRulestackListCountriesOptionalParams, + GlobalRulestackListCountriesResponse, + GlobalRulestackListFirewallsOptionalParams, + GlobalRulestackListFirewallsResponse, + GlobalRulestackListPredefinedUrlCategoriesOptionalParams, + GlobalRulestackListPredefinedUrlCategoriesResponse, + SecurityServicesTypeEnum, + GlobalRulestackListSecurityServicesOptionalParams, + GlobalRulestackListSecurityServicesResponse, + GlobalRulestackRevertOptionalParams +} from "../models"; + +/// +/** Interface representing a GlobalRulestack. */ +export interface GlobalRulestack { + /** + * List GlobalRulestackResource resources by Tenant + * @param options The options parameters. + */ + list( + options?: GlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + get( + globalRulestackName: string, + options?: GlobalRulestackGetOptionalParams + ): Promise; + /** + * Create a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + resource: GlobalRulestackResource, + options?: GlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + resource: GlobalRulestackResource, + options?: GlobalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + globalRulestackName: string, + properties: GlobalRulestackResourceUpdate, + options?: GlobalRulestackUpdateOptionalParams + ): Promise; + /** + * Delete a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + options?: GlobalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a GlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + options?: GlobalRulestackDeleteOptionalParams + ): Promise; + /** + * Commit rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + beginCommit( + globalRulestackName: string, + options?: GlobalRulestackCommitOptionalParams + ): Promise, void>>; + /** + * Commit rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + beginCommitAndWait( + globalRulestackName: string, + options?: GlobalRulestackCommitOptionalParams + ): Promise; + /** + * Get changelog + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + getChangeLog( + globalRulestackName: string, + options?: GlobalRulestackGetChangeLogOptionalParams + ): Promise; + /** + * Get the list of advanced security objects + * @param globalRulestackName GlobalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listAdvancedSecurityObjects( + globalRulestackName: string, + typeParam: AdvSecurityObjectTypeEnum, + options?: GlobalRulestackListAdvancedSecurityObjectsOptionalParams + ): Promise; + /** + * List of AppIds for GlobalRulestack ApiVersion + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listAppIds( + globalRulestackName: string, + options?: GlobalRulestackListAppIdsOptionalParams + ): Promise; + /** + * List of countries for Rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listCountries( + globalRulestackName: string, + options?: GlobalRulestackListCountriesOptionalParams + ): Promise; + /** + * List of Firewalls associated with Rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listFirewalls( + globalRulestackName: string, + options?: GlobalRulestackListFirewallsOptionalParams + ): Promise; + /** + * List predefined URL categories for rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + listPredefinedUrlCategories( + globalRulestackName: string, + options?: GlobalRulestackListPredefinedUrlCategoriesOptionalParams + ): Promise; + /** + * List the security services for rulestack + * @param globalRulestackName GlobalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listSecurityServices( + globalRulestackName: string, + typeParam: SecurityServicesTypeEnum, + options?: GlobalRulestackListSecurityServicesOptionalParams + ): Promise; + /** + * Revert rulestack configuration + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + revert( + globalRulestackName: string, + options?: GlobalRulestackRevertOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/index.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..ff53ec788230 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/index.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./globalRulestack"; +export * from "./certificateObjectGlobalRulestack"; +export * from "./fqdnListGlobalRulestack"; +export * from "./postRules"; +export * from "./prefixListGlobalRulestack"; +export * from "./preRules"; +export * from "./operations"; +export * from "./firewalls"; +export * from "./localRulestacks"; +export * from "./certificateObjectLocalRulestack"; +export * from "./fqdnListLocalRulestack"; +export * from "./localRules"; +export * from "./prefixListLocalRulestack"; diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRules.ts new file mode 100644 index 000000000000..8f68d21414ff --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRules.ts @@ -0,0 +1,153 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LocalRulesResource, + LocalRulesListByLocalRulestacksOptionalParams, + LocalRulesGetOptionalParams, + LocalRulesGetResponse, + LocalRulesCreateOrUpdateOptionalParams, + LocalRulesCreateOrUpdateResponse, + LocalRulesDeleteOptionalParams, + LocalRulesGetCountersOptionalParams, + LocalRulesGetCountersResponse, + LocalRulesRefreshCountersOptionalParams, + LocalRulesResetCountersOptionalParams, + LocalRulesResetCountersResponse +} from "../models"; + +/// +/** Interface representing a LocalRules. */ +export interface LocalRules { + /** + * List LocalRulesResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulesListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesGetOptionalParams + ): Promise; + /** + * Create a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + priority: string, + resource: LocalRulesResource, + options?: LocalRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LocalRulesCreateOrUpdateResponse + > + >; + /** + * Create a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + priority: string, + resource: LocalRulesResource, + options?: LocalRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a LocalRulesResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesDeleteOptionalParams + ): Promise; + /** + * Get counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + getCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesGetCountersOptionalParams + ): Promise; + /** + * Refresh counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + refreshCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesRefreshCountersOptionalParams + ): Promise; + /** + * Reset counters + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param priority Local Rule priority + * @param options The options parameters. + */ + resetCounters( + resourceGroupName: string, + localRulestackName: string, + priority: string, + options?: LocalRulesResetCountersOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRulestacks.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRulestacks.ts new file mode 100644 index 000000000000..ef3662213c85 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/localRulestacks.ts @@ -0,0 +1,266 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + LocalRulestackResource, + LocalRulestacksListBySubscriptionOptionalParams, + LocalRulestacksListByResourceGroupOptionalParams, + LocalRulestacksGetOptionalParams, + LocalRulestacksGetResponse, + LocalRulestacksCreateOrUpdateOptionalParams, + LocalRulestacksCreateOrUpdateResponse, + LocalRulestackResourceUpdate, + LocalRulestacksUpdateOptionalParams, + LocalRulestacksUpdateResponse, + LocalRulestacksDeleteOptionalParams, + LocalRulestacksCommitOptionalParams, + LocalRulestacksGetChangeLogOptionalParams, + LocalRulestacksGetChangeLogResponse, + LocalRulestacksGetSupportInfoOptionalParams, + LocalRulestacksGetSupportInfoResponse, + AdvSecurityObjectTypeEnum, + LocalRulestacksListAdvancedSecurityObjectsOptionalParams, + LocalRulestacksListAdvancedSecurityObjectsResponse, + LocalRulestacksListAppIdsOptionalParams, + LocalRulestacksListAppIdsResponse, + LocalRulestacksListCountriesOptionalParams, + LocalRulestacksListCountriesResponse, + LocalRulestacksListFirewallsOptionalParams, + LocalRulestacksListFirewallsResponse, + LocalRulestacksListPredefinedUrlCategoriesOptionalParams, + LocalRulestacksListPredefinedUrlCategoriesResponse, + SecurityServicesTypeEnum, + LocalRulestacksListSecurityServicesOptionalParams, + LocalRulestacksListSecurityServicesResponse, + LocalRulestacksRevertOptionalParams +} from "../models"; + +/// +/** Interface representing a LocalRulestacks. */ +export interface LocalRulestacks { + /** + * List LocalRulestackResource resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: LocalRulestacksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List LocalRulestackResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: LocalRulestacksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetOptionalParams + ): Promise; + /** + * Create a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + resource: LocalRulestackResource, + options?: LocalRulestacksCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + LocalRulestacksCreateOrUpdateResponse + > + >; + /** + * Create a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + resource: LocalRulestackResource, + options?: LocalRulestacksCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + localRulestackName: string, + properties: LocalRulestackResourceUpdate, + options?: LocalRulestacksUpdateOptionalParams + ): Promise; + /** + * Delete a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a LocalRulestackResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksDeleteOptionalParams + ): Promise; + /** + * Commit rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + beginCommit( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksCommitOptionalParams + ): Promise, void>>; + /** + * Commit rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + beginCommitAndWait( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksCommitOptionalParams + ): Promise; + /** + * Get changelog + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + getChangeLog( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetChangeLogOptionalParams + ): Promise; + /** + * support info for rulestack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + getSupportInfo( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksGetSupportInfoOptionalParams + ): Promise; + /** + * Get the list of advanced security objects + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listAdvancedSecurityObjects( + resourceGroupName: string, + localRulestackName: string, + typeParam: AdvSecurityObjectTypeEnum, + options?: LocalRulestacksListAdvancedSecurityObjectsOptionalParams + ): Promise; + /** + * List of AppIds for LocalRulestack ApiVersion + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listAppIds( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListAppIdsOptionalParams + ): Promise; + /** + * List of countries for Rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listCountries( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListCountriesOptionalParams + ): Promise; + /** + * List of Firewalls associated with Rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listFirewalls( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListFirewallsOptionalParams + ): Promise; + /** + * List predefined URL categories for rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listPredefinedUrlCategories( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksListPredefinedUrlCategoriesOptionalParams + ): Promise; + /** + * List the security services for rulestack + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param typeParam + * @param options The options parameters. + */ + listSecurityServices( + resourceGroupName: string, + localRulestackName: string, + typeParam: SecurityServicesTypeEnum, + options?: LocalRulestacksListSecurityServicesOptionalParams + ): Promise; + /** + * Revert rulestack configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + revert( + resourceGroupName: string, + localRulestackName: string, + options?: LocalRulestacksRevertOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/operations.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..5cf5581845bd --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * List the operations for the provider + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/postRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/postRules.ts new file mode 100644 index 000000000000..2071245ce1a5 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/postRules.ts @@ -0,0 +1,135 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PostRulesResource, + PostRulesListOptionalParams, + PostRulesGetOptionalParams, + PostRulesGetResponse, + PostRulesCreateOrUpdateOptionalParams, + PostRulesCreateOrUpdateResponse, + PostRulesDeleteOptionalParams, + PostRulesGetCountersOptionalParams, + PostRulesGetCountersResponse, + PostRulesRefreshCountersOptionalParams, + PostRulesResetCountersOptionalParams, + PostRulesResetCountersResponse +} from "../models"; + +/// +/** Interface representing a PostRules. */ +export interface PostRules { + /** + * List PostRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + list( + globalRulestackName: string, + options?: PostRulesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + priority: string, + options?: PostRulesGetOptionalParams + ): Promise; + /** + * Create a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + priority: string, + resource: PostRulesResource, + options?: PostRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PostRulesCreateOrUpdateResponse + > + >; + /** + * Create a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + priority: string, + resource: PostRulesResource, + options?: PostRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + priority: string, + options?: PostRulesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a PostRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + priority: string, + options?: PostRulesDeleteOptionalParams + ): Promise; + /** + * Get counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + getCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesGetCountersOptionalParams + ): Promise; + /** + * Refresh counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + refreshCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesRefreshCountersOptionalParams + ): Promise; + /** + * Reset counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Post Rule priority + * @param options The options parameters. + */ + resetCounters( + globalRulestackName: string, + priority: string, + options?: PostRulesResetCountersOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/preRules.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/preRules.ts new file mode 100644 index 000000000000..39c57d737090 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/preRules.ts @@ -0,0 +1,135 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PreRulesResource, + PreRulesListOptionalParams, + PreRulesGetOptionalParams, + PreRulesGetResponse, + PreRulesCreateOrUpdateOptionalParams, + PreRulesCreateOrUpdateResponse, + PreRulesDeleteOptionalParams, + PreRulesGetCountersOptionalParams, + PreRulesGetCountersResponse, + PreRulesRefreshCountersOptionalParams, + PreRulesResetCountersOptionalParams, + PreRulesResetCountersResponse +} from "../models"; + +/// +/** Interface representing a PreRules. */ +export interface PreRules { + /** + * List PreRulesResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + list( + globalRulestackName: string, + options?: PreRulesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + priority: string, + options?: PreRulesGetOptionalParams + ): Promise; + /** + * Create a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + priority: string, + resource: PreRulesResource, + options?: PreRulesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PreRulesCreateOrUpdateResponse + > + >; + /** + * Create a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + priority: string, + resource: PreRulesResource, + options?: PreRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + priority: string, + options?: PreRulesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a PreRulesResource + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + priority: string, + options?: PreRulesDeleteOptionalParams + ): Promise; + /** + * Get counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + getCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesGetCountersOptionalParams + ): Promise; + /** + * Refresh counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + refreshCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesRefreshCountersOptionalParams + ): Promise; + /** + * Reset counters + * @param globalRulestackName GlobalRulestack resource name + * @param priority Pre Rule priority + * @param options The options parameters. + */ + resetCounters( + globalRulestackName: string, + priority: string, + options?: PreRulesResetCountersOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListGlobalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListGlobalRulestack.ts new file mode 100644 index 000000000000..aefa0f51f456 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListGlobalRulestack.ts @@ -0,0 +1,97 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PrefixListGlobalRulestackResource, + PrefixListGlobalRulestackListOptionalParams, + PrefixListGlobalRulestackGetOptionalParams, + PrefixListGlobalRulestackGetResponse, + PrefixListGlobalRulestackCreateOrUpdateOptionalParams, + PrefixListGlobalRulestackCreateOrUpdateResponse, + PrefixListGlobalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrefixListGlobalRulestack. */ +export interface PrefixListGlobalRulestack { + /** + * List PrefixListGlobalRulestackResource resources by Tenant + * @param globalRulestackName GlobalRulestack resource name + * @param options The options parameters. + */ + list( + globalRulestackName: string, + options?: PrefixListGlobalRulestackListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + get( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackGetOptionalParams + ): Promise; + /** + * Create a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + globalRulestackName: string, + name: string, + resource: PrefixListGlobalRulestackResource, + options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrefixListGlobalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + globalRulestackName: string, + name: string, + resource: PrefixListGlobalRulestackResource, + options?: PrefixListGlobalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + beginDelete( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a PrefixListGlobalRulestackResource + * @param globalRulestackName GlobalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + beginDeleteAndWait( + globalRulestackName: string, + name: string, + options?: PrefixListGlobalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListLocalRulestack.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListLocalRulestack.ts new file mode 100644 index 000000000000..9bad1d4f666f --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/operationsInterfaces/prefixListLocalRulestack.ts @@ -0,0 +1,109 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PrefixListResource, + PrefixListLocalRulestackListByLocalRulestacksOptionalParams, + PrefixListLocalRulestackGetOptionalParams, + PrefixListLocalRulestackGetResponse, + PrefixListLocalRulestackCreateOrUpdateOptionalParams, + PrefixListLocalRulestackCreateOrUpdateResponse, + PrefixListLocalRulestackDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PrefixListLocalRulestack. */ +export interface PrefixListLocalRulestack { + /** + * List PrefixListResource resources by LocalRulestacks + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param options The options parameters. + */ + listByLocalRulestacks( + resourceGroupName: string, + localRulestackName: string, + options?: PrefixListLocalRulestackListByLocalRulestacksOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackGetOptionalParams + ): Promise; + /** + * Create a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: PrefixListResource, + options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrefixListLocalRulestackCreateOrUpdateResponse + > + >; + /** + * Create a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + resource: PrefixListResource, + options?: PrefixListLocalRulestackCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a PrefixListResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param localRulestackName LocalRulestack resource name + * @param name Local Rule priority + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + localRulestackName: string, + name: string, + options?: PrefixListLocalRulestackDeleteOptionalParams + ): Promise; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/pagingHelper.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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 interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/paloAltoNetworksCloudngfw.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/paloAltoNetworksCloudngfw.ts new file mode 100644 index 000000000000..c39ea750c8aa --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/src/paloAltoNetworksCloudngfw.ts @@ -0,0 +1,196 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { + GlobalRulestackImpl, + CertificateObjectGlobalRulestackImpl, + FqdnListGlobalRulestackImpl, + PostRulesImpl, + PrefixListGlobalRulestackImpl, + PreRulesImpl, + OperationsImpl, + FirewallsImpl, + LocalRulestacksImpl, + CertificateObjectLocalRulestackImpl, + FqdnListLocalRulestackImpl, + LocalRulesImpl, + PrefixListLocalRulestackImpl +} from "./operations"; +import { + GlobalRulestack, + CertificateObjectGlobalRulestack, + FqdnListGlobalRulestack, + PostRules, + PrefixListGlobalRulestack, + PreRules, + Operations, + Firewalls, + LocalRulestacks, + CertificateObjectLocalRulestack, + FqdnListLocalRulestack, + LocalRules, + PrefixListLocalRulestack +} from "./operationsInterfaces"; +import { PaloAltoNetworksCloudngfwOptionalParams } from "./models"; + +export class PaloAltoNetworksCloudngfw extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the PaloAltoNetworksCloudngfw class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: PaloAltoNetworksCloudngfwOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: PaloAltoNetworksCloudngfwOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-paloaltonetworksngfw/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2022-08-29-preview"; + this.globalRulestack = new GlobalRulestackImpl(this); + this.certificateObjectGlobalRulestack = new CertificateObjectGlobalRulestackImpl( + this + ); + this.fqdnListGlobalRulestack = new FqdnListGlobalRulestackImpl(this); + this.postRules = new PostRulesImpl(this); + this.prefixListGlobalRulestack = new PrefixListGlobalRulestackImpl(this); + this.preRules = new PreRulesImpl(this); + this.operations = new OperationsImpl(this); + this.firewalls = new FirewallsImpl(this); + this.localRulestacks = new LocalRulestacksImpl(this); + this.certificateObjectLocalRulestack = new CertificateObjectLocalRulestackImpl( + this + ); + this.fqdnListLocalRulestack = new FqdnListLocalRulestackImpl(this); + this.localRules = new LocalRulesImpl(this); + this.prefixListLocalRulestack = new PrefixListLocalRulestackImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + globalRulestack: GlobalRulestack; + certificateObjectGlobalRulestack: CertificateObjectGlobalRulestack; + fqdnListGlobalRulestack: FqdnListGlobalRulestack; + postRules: PostRules; + prefixListGlobalRulestack: PrefixListGlobalRulestack; + preRules: PreRules; + operations: Operations; + firewalls: Firewalls; + localRulestacks: LocalRulestacks; + certificateObjectLocalRulestack: CertificateObjectLocalRulestack; + fqdnListLocalRulestack: FqdnListLocalRulestack; + localRules: LocalRules; + prefixListLocalRulestack: PrefixListLocalRulestack; +} diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/test/sampleTest.ts b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/tsconfig.json b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/paloaltonetworksngfw/ci.mgmt.yml b/sdk/paloaltonetworksngfw/ci.mgmt.yml new file mode 100644 index 000000000000..8d1e4e233426 --- /dev/null +++ b/sdk/paloaltonetworksngfw/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw + - sdk/paloaltonetworksngfw/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/paloaltonetworksngfw/arm-paloaltonetworksngfw + - sdk/paloaltonetworksngfw/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: paloaltonetworksngfw + Artifacts: + - name: azure-arm-paloaltonetworksngfw + safeName: azurearmpaloaltonetworksngfw + \ No newline at end of file