diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2a21ccf9010c..68be1681fb6b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -72,19 +72,19 @@ importers: version: file:projects/app-configuration.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-advisor': specifier: file:./projects/arm-advisor.tgz - version: file:projects/arm-advisor.tgz + version: file:projects/arm-advisor.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-agrifood': specifier: file:./projects/arm-agrifood.tgz - version: file:projects/arm-agrifood.tgz + version: file:projects/arm-agrifood.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-analysisservices': specifier: file:./projects/arm-analysisservices.tgz version: file:projects/arm-analysisservices.tgz '@rush-temp/arm-apicenter': specifier: file:./projects/arm-apicenter.tgz - version: file:projects/arm-apicenter.tgz + version: file:projects/arm-apicenter.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-apimanagement': specifier: file:./projects/arm-apimanagement.tgz - version: file:projects/arm-apimanagement.tgz + version: file:projects/arm-apimanagement.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) '@rush-temp/arm-appcomplianceautomation': specifier: file:./projects/arm-appcomplianceautomation.tgz version: file:projects/arm-appcomplianceautomation.tgz @@ -2516,11 +2516,11 @@ packages: version: 0.0.0 '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz': - resolution: {integrity: sha512-xSYl+4IYPWIxFqAyION4BRsWO/OfSl2l0qETNmvz9LyfTDY36sw6tcqvzk0CVGp1M6rfzSFpkqqVhr2sTLqyLw==, tarball: file:projects/arm-advisor.tgz} + resolution: {integrity: sha512-DSmDhGai4HPlrXuT+XuOo23UXk5rGNWK6MYU2DasODsLUEbzpyHacsH3vempWORzjXJ8/BQipeCTBg2AOReE0g==, tarball: file:projects/arm-advisor.tgz} version: 0.0.0 '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz': - resolution: {integrity: sha512-faqvQ6Yfe9K1eDj3m5YlpfAgE2vZXU3ERmbD9+npJdRhxEvazTNlKt6rMGCDkT6hb20CU8qO7eNpUx6ht//OeQ==, tarball: file:projects/arm-agrifood.tgz} + resolution: {integrity: sha512-Kv3K2J9hLs9u3a7bAIHg32VOovsjFMkNX4YyPdtzl8nvbJDbkWbgJMldGePCsVfQT/gKt9rb4FjQkuaEOnoXAg==, tarball: file:projects/arm-agrifood.tgz} version: 0.0.0 '@rush-temp/arm-analysisservices@file:projects/arm-analysisservices.tgz': @@ -2528,11 +2528,11 @@ packages: version: 0.0.0 '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz': - resolution: {integrity: sha512-7XnNlP+0iJQNJDlkcWeF5p2VfK3WokuFIR9TTVcsKp+HLFux7NxRLmJWOc0MHY+xCRInmoQGDWvIP7iyrvXKlw==, tarball: file:projects/arm-apicenter.tgz} + resolution: {integrity: sha512-15A5ivtSWTZ75Ev16QNA4jGVSb8pv3EZ4jif8RhfShiTAn8EK4S6fVqB3C0254Yv05PAqqjqspplpLWHqkVZfg==, tarball: file:projects/arm-apicenter.tgz} version: 0.0.0 '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': - resolution: {integrity: sha512-00aKO8kZKXmEPx1Dk6WJaNWTZlkf8a/ACSgfzO3KJl+ajhHz6esxJiUXzr8JD946eXlxiEJ1HelJpeZKJQWMxg==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-21fUiCFQejze8e2l3PwTiHFc8KDuj3L8nXnEeFExNELM/nS+iCf6rEih+d5pe0+O6rQ3camxDNAA223kC/eBCA==, tarball: file:projects/arm-apimanagement.tgz} version: 0.0.0 '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': @@ -10369,42 +10369,59 @@ snapshots: - vite - webdriverio - '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz': + '@rush-temp/arm-advisor@file:projects/arm-advisor.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz': + '@rush-temp/arm-agrifood@file:projects/arm-agrifood.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser '@rush-temp/arm-analysisservices@file:projects/arm-analysisservices.tgz': dependencies: @@ -10425,45 +10442,55 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz': + '@rush-temp/arm-apicenter@file:projects/arm-apicenter.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser - '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': + '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': dependencies: diff --git a/common/tools/dev-tool/src/commands/admin/migrate-package.ts b/common/tools/dev-tool/src/commands/admin/migrate-package.ts index 0625101e82a6..b38b7b080520 100644 --- a/common/tools/dev-tool/src/commands/admin/migrate-package.ts +++ b/common/tools/dev-tool/src/commands/admin/migrate-package.ts @@ -100,7 +100,7 @@ export default leafCommand(commandInfo, async ({ "package-name": packageName, br async function prepareFiles(projectFolder: string, options: { browser: boolean }): Promise { log.info("Migrating package.json, tsconfig.json, and api-extractor.json"); - await upgradePackageJson(projectFolder, resolve(projectFolder, "package.json")); + await upgradePackageJson(projectFolder, resolve(projectFolder, "package.json"), options); await upgradeTypeScriptConfig(resolve(projectFolder, "tsconfig.json")); await fixApiExtractorConfig(resolve(projectFolder, "api-extractor.json")); await commitChanges(projectFolder, "Update package.json, tsconfig.json, and api-extractor.json"); @@ -110,6 +110,7 @@ async function prepareFiles(projectFolder: string, options: { browser: boolean } await writeBrowserTestConfig(projectFolder); await writeFile(resolve(projectFolder, "vitest.browser.config.ts"), VITEST_BROWSER_CONFIG); } + await writeFile(resolve(projectFolder, "vitest.esm.config.ts"), VITEST_ESM_CONFIG); await writeFile(resolve(projectFolder, "vitest.config.ts"), VITEST_CONFIG); await commitChanges(projectFolder, "Update test config"); @@ -121,13 +122,24 @@ async function prepareFiles(projectFolder: string, options: { browser: boolean } async function applyCodemods(projectFolder: string): Promise { const project = new Project({ tsConfigFilePath: resolve(projectFolder, "tsconfig.json") }); + const skipPatterns = [/^vitest.*\.config\.ts$/]; + // Apply the codemods, one at a time, to all source files in the project. // Commit the changes after each codemod is applied for ease of reviewing. // For more information on the codemods and how to contribute, see the `codemods` directory. for (const mod of codemods) { log.info(`Applying codemod: ${mod.name}`); for (const sourceFile of project.getSourceFiles()) { + // Skip config files + if (skipPatterns.some((pattern) => pattern.test(sourceFile.getBaseName()))) { + continue; + } + mod(sourceFile); + + // Clean up source file after applying the codemod + sourceFile.fixUnusedIdentifiers(); + await sourceFile.save(); } await commitChanges(projectFolder, `Apply codemod: "${mod.name}"`); @@ -138,17 +150,9 @@ const VITEST_CONFIG = ` // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { defineConfig, mergeConfig } from "vitest/config"; import viteConfig from "../../../vitest.shared.config.ts"; -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - include: ["test/**/*.spec.ts"], - }, - }), -); +export default viteConfig; `; const VITEST_BROWSER_CONFIG = ` @@ -170,6 +174,20 @@ export default mergeConfig( ); `; +const VITEST_ESM_CONFIG = ` +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); +`; + async function writeBrowserTestConfig(packageFolder: string): Promise { const testConfig = { extends: "./.tshy/build.json", @@ -217,30 +235,55 @@ async function cleanupFiles(projectFolder: string): Promise { } async function upgradeTypeScriptConfig(tsconfigPath: string): Promise { - const tsConfig = JSON.parse(await readFile(tsconfigPath, "utf-8")); - - // Set module resolution - tsConfig.compilerOptions.module = "NodeNext"; - tsConfig.compilerOptions.moduleResolution = "NodeNext"; - tsConfig.compilerOptions.rootDir = "."; - tsConfig.include = [ - "src/**/*.ts", - "src/**/*.mts", - "src/**/*.cts", - "samples-dev/**/*.ts", // TODO: Check if samples-dev is needed - "test/**/*.ts", - "test/**/*.mts", - "test/**/*.cts", - ]; + const packageJson = JSON.parse( + await readFile(resolve(dirname(tsconfigPath), "package.json"), "utf-8"), + ); - // Remove old options - delete tsConfig.compilerOptions.outDir; - delete tsConfig.compilerOptions.declarationDir; + const tsConfig = { + references: [ + { + path: "./tsconfig.src.json", + }, + { + path: "./tsconfig.samples.json", + }, + { + path: "./tsconfig.test.json", + }, + ], + }; await saveJson(tsconfigPath, tsConfig); + + const tsSamplesConfig = { + extends: "../../../tsconfig.samples.base.json", + compilerOptions: { + paths: { + [`${packageJson.name}`]: ["./dist/esm"], + }, + }, + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.samples.json"), tsSamplesConfig); + + const tsConfigSrc = { + extends: "../../../tsconfig.lib.json", + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.src.json"), tsConfigSrc); + + const tsConfigTest = { + extends: ["./tsconfig.src.json", "../../../tsconfig.test.base.json"], + }; + + await saveJson(resolve(dirname(tsconfigPath), "tsconfig.test.json"), tsConfigTest); } -async function upgradePackageJson(projectFolder: string, packageJsonPath: string): Promise { +async function upgradePackageJson( + projectFolder: string, + packageJsonPath: string, + options: { browser: boolean }, +): Promise { const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8")); // Change the module type to ESM @@ -250,37 +293,56 @@ async function upgradePackageJson(projectFolder: string, packageJsonPath: string removeLegacyPackages(packageJson); // Add the new packages - await addNewPackages(packageJson); + await addNewPackages(packageJson, options); // Sort the devDependencies sortPackage(packageJson); // Add tshy - addTypeScriptHybridizer(packageJson); + addTypeScriptHybridizer(packageJson, options); // Set files setFilesSection(packageJson); // Set scripts - setScriptsSection(packageJson.scripts); + setScriptsSection(packageJson.scripts, { + ...options, + isArm: packageJson.name.includes("@azure/arm-"), + }); // Rename files and rewrite browser field await renameFieldFiles("browser", "browser", projectFolder, packageJson); await renameFieldFiles("react-native", "native", projectFolder, packageJson); packageJson.browser = "./dist/browser/index.js"; - delete packageJson["react-native"]; + packageJson["react-native"] = "./dist/react-native/index.js"; + + if (!options.browser) { + packageJson.browser = undefined; + packageJson["react-native"] = undefined; + } // Save the updated package.json await saveJson(packageJsonPath, packageJson); } -function setScriptsSection(scripts: PackageJson["scripts"]): void { - scripts["build"] = "npm run clean && dev-tool run build-package && dev-tool run extract-api"; +function setScriptsSection( + scripts: PackageJson["scripts"], + options: { browser: boolean; isArm: boolean }, +): void { + scripts["build"] = + "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api"; + + if (options.browser) { + scripts["unit-test:browser"] = + "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser"; + } - scripts["unit-test:browser"] = - "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser"; scripts["unit-test:node"] = "dev-tool run test:vitest"; + if (options.isArm) { + scripts["integration-test:node"] = "dev-tool run test:vitest --esm"; + } + for (const script of Object.keys(scripts)) { if (scripts[script].includes("tsc -p .")) { log.info(`Replacing usage of "tsc -p ." with "dev-tool run build-package" in ${script}`); @@ -292,11 +354,15 @@ function setScriptsSection(scripts: PackageJson["scripts"]): void { // eslint-disable-next-line @typescript-eslint/no-explicit-any function setFilesSection(packageJson: any): void { packageJson.files = ["dist/", "README.md", "LICENSE"]; + if (packageJson.name.includes("@azure/arm-")) { + packageJson.files.push("review/", "CHANGELOG.md"); + } } // eslint-disable-next-line @typescript-eslint/no-explicit-any -function addTypeScriptHybridizer(packageJson: any): void { +function addTypeScriptHybridizer(packageJson: any, options: { browser: boolean }): void { packageJson["tshy"] = { + project: "./tsconfig.src.json", exports: { "./package.json": "./package.json", ".": "./src/index.ts", @@ -306,6 +372,11 @@ function addTypeScriptHybridizer(packageJson: any): void { selfLink: false, }; + // Remove the esmDialects for arm packages since we don't support ARM in the browser + if (!options.browser) { + delete packageJson["tshy"].esmDialects; + } + // Check if there are subpath exports if (packageJson.exports) { for (const key of Object.keys(packageJson.exports)) { @@ -318,15 +389,18 @@ function addTypeScriptHybridizer(packageJson: any): void { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -async function addNewPackages(packageJson: any): Promise { - const newPackages = { +async function addNewPackages(packageJson: any, options: { browser: boolean }): Promise { + const newPackages: Record = { "@azure-tools/test-utils-vitest": "1.0.0", - "@vitest/browser": undefined, "@vitest/coverage-istanbul": undefined, - playwright: undefined, vitest: undefined, }; + if (options.browser) { + newPackages["@vitest/browser"] = undefined; + newPackages["playwright"] = undefined; + } + for (const [newPackage, desiredMinVersion] of Object.entries(newPackages)) { let latestVersion = desiredMinVersion; if (!latestVersion) { diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts index d613bcb1c539..1d645f559aea 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/fixSourceFile.ts @@ -8,6 +8,7 @@ export default function fixSourceFile(sourceFile: SourceFile): void { "chai.use(chaiAsPromised);", "chai.use(chaiExclude);", "const expect = chai.expect;", + "dotenv.config();", ]; // Iterate over all the statements in the source file for (const statement of sourceFile.getStatements()) { @@ -17,12 +18,19 @@ export default function fixSourceFile(sourceFile: SourceFile): void { statement.remove(); } } + } + for (const statement of sourceFile.getStatements()) { const patternsToReplace = [ + { pattern: /\(this: Suite\)/g, replace: "(ctx)" }, { pattern: /\(this: Context\)/g, replace: "(ctx)" }, { pattern: /\(this\.currentTest\)/g, replace: "(ctx)" }, { pattern: /\(!this\.currentTest\?\.isPending\(\)\)/g, replace: "(!ctx.task.pending)" }, { pattern: /this\.skip\(\);/g, replace: "ctx.skip();" }, + { + pattern: /import\s+(?:\*\s+as\s+dotenv|dotenv)\s+from\s+"dotenv";/g, + replace: 'import "dotenv/config";', + }, ]; // Replace the patterns in the source file diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts index 258311506c87..f8ac3242c46d 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceChaiAsPromised.ts @@ -1,5 +1,5 @@ import { SourceFile, SyntaxKind, Node } from "ts-morph"; -import * as ts from "typescript"; // For using TypeScript factory methods +import ts from "typescript"; // For using TypeScript factory methods /** * Converts usages of `assert.isRejected` from chai-as-promised to `expect(...).rejects.toThrow(...)` diff --git a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts index d8998176b779..ad8f5b7ea979 100644 --- a/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts +++ b/common/tools/dev-tool/src/util/admin/migrate-package/codemods/replaceSinonStubs.ts @@ -1,5 +1,100 @@ -import { SourceFile, SyntaxKind, Node } from "ts-morph"; -import * as ts from "typescript"; // For using TypeScript factory methods +import { SourceFile, SyntaxKind, Node, ForEachDescendantTraversalControl } from "ts-morph"; +import ts from "typescript"; // For using TypeScript factory methods + +function replaceWithViFn(node: Node, traversal: ForEachDescendantTraversalControl) { + const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); + const methodNameAfterStub = parent?.getName(); + + if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { + const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (returnsCall && returnsCall.getArguments().length > 0) { + const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text + const vitestMethod = + methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; + + // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue + // or spyOn + mockResolvedValue depending on the method name + returnsCall.replaceWithText(` + vi.fn() + .${vitestMethod}(${returnValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === "throwsException") { + const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (throwsCall && throwsCall.getArguments().length > 0) { + const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text + + // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue + throwsCall.replaceWithText(` + vi.fn() + .mockRejectedValue(${errorValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === undefined) { + // Replace the entire call chain (sinon.stub) with spyOn + node.replaceWithText(`vi.fn()`); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } +} + +function replaceWithViSpyOn( + node: Node, + traversal: ForEachDescendantTraversalControl, + args: Node[], +) { + const obj = args[0].getText(); // Extract text before replacing the node + const methodName = args[1].getText(); // Extract text before replacing the node + + const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); + const methodNameAfterStub = parent?.getName(); + + if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { + const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (returnsCall && returnsCall.getArguments().length > 0) { + const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text + const vitestMethod = + methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; + + // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue + // or spyOn + mockResolvedValue depending on the method name + returnsCall.replaceWithText(` + vi.spyOn(${obj}, ${methodName}) + .${vitestMethod}(${returnValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === "throwsException") { + const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); + if (throwsCall && throwsCall.getArguments().length > 0) { + const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text + + // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue + throwsCall.replaceWithText(` + vi.spyOn(${obj}, ${methodName}) + .mockRejectedValue(${errorValue}) + `); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } + } else if (methodNameAfterStub === undefined) { + // Replace the entire call chain (sinon.stub) with spyOn + node.replaceWithText(`vi.spyOn(${obj}, ${methodName})`); + + // Skip all children of the current node as it was already transformed + traversal.skip(); + } +} /** * Replaces usages of `sinon.stub` with `vi.spyOn` and `sinon.restore` with `vi.restoreAllMocks` @@ -11,6 +106,7 @@ import * as ts from "typescript"; // For using TypeScript factory methods * 3. sinon.stub(obj, "methodName").throwsException(someError) => vi.spyOn(obj, "methodName").mockRejectedValue(someError) * 4. sinon.restore() => vi.restoreAllMocks() * 5. sandbox.restore() => vi.restoreAllMocks() + * 6. sinon.stub() => vi.fn() */ export default function replaceSinonStub(sourceFile: SourceFile) { // Helper function to perform a case-insensitive check for the 'sinon' identifier @@ -30,51 +126,11 @@ export default function replaceSinonStub(sourceFile: SourceFile) { callee.getName() === "stub" ) { const args = node.getArguments(); - if (args.length < 2) return; // Ensure we have enough arguments - - const obj = args[0].getText(); // Extract text before replacing the node - const methodName = args[1].getText(); // Extract text before replacing the node - - const parent = node.getParentIfKind(SyntaxKind.PropertyAccessExpression); - const methodNameAfterStub = parent?.getName(); - - if (methodNameAfterStub === "returns" || methodNameAfterStub === "resolves") { - const returnsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); - if (returnsCall && returnsCall.getArguments().length > 0) { - const returnValue = returnsCall.getArguments()[0].getText(); // Extract the text - const vitestMethod = - methodNameAfterStub === "returns" ? "mockReturnValue" : "mockResolvedValue"; - - // Replace the entire call chain (stub + returns) with spyOn + mockReturnValue - // or spyOn + mockResolvedValue depending on the method name - returnsCall.replaceWithText(` - vi.spyOn(${obj}, ${methodName}) - .${vitestMethod}(${returnValue}) - `); - - // Skip all children of the current node as it was already transformed - traversal.skip(); - } - } else if (methodNameAfterStub === "throwsException") { - const throwsCall = parent?.getParentIfKind(SyntaxKind.CallExpression); - if (throwsCall && throwsCall.getArguments().length > 0) { - const errorValue = throwsCall.getArguments()[0].getText(); // Extract the text - - // Replace the entire call chain (stub + throwsException) with spyOn + mockRejectedValue - throwsCall.replaceWithText(` - vi.spyOn(${obj}, ${methodName}) - .mockRejectedValue(${errorValue}) - `); - - // Skip all children of the current node as it was already transformed - traversal.skip(); - } - } else if (methodNameAfterStub === undefined) { - // Replace the entire call chain (sinon.stub) with spyOn - node.replaceWithText(`vi.spyOn(${obj}, ${methodName})`); - // Skip all children of the current node as it was already transformed - traversal.skip(); + if (args.length === 0) { + replaceWithViFn(node, traversal); + } else if (args.length >= 2) { + replaceWithViSpyOn(node, traversal, args); } } else if ( ts.isPropertyAccessExpression(callee.compilerNode) && diff --git a/sdk/advisor/arm-advisor/_meta.json b/sdk/advisor/arm-advisor/_meta.json index 4b4bad644990..ce11f5e46b86 100644 --- a/sdk/advisor/arm-advisor/_meta.json +++ b/sdk/advisor/arm-advisor/_meta.json @@ -5,4 +5,4 @@ "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.5" -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/api-extractor.json b/sdk/advisor/arm-advisor/api-extractor.json index 5b9d5e7e4360..5992db77be9e 100644 --- a/sdk/advisor/arm-advisor/api-extractor.json +++ b/sdk/advisor/arm-advisor/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-advisor.d.ts" + "publicTrimmedFilePath": "dist/arm-advisor.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/package.json b/sdk/advisor/arm-advisor/package.json index 86ed016aa23a..c8f2adba53fa 100644 --- a/sdk/advisor/arm-advisor/package.json +++ b/sdk/advisor/arm-advisor/package.json @@ -8,11 +8,11 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", - "tslib": "^2.2.0" + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", @@ -22,22 +22,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-advisor.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -47,36 +47,26 @@ "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", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", "build:test": "echo skipped", - "check-format": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -86,7 +76,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -107,5 +97,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-advisor?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts index f4d384684b82..6b2663954bf8 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ConfigData, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Overwrite Azure Advisor configuration. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json */ async function putConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const configurationName = "default"; const resourceGroup = "resourceGroup"; const configContract: ConfigData = { @@ -36,27 +33,27 @@ async function putConfigurations() { "Security", "Performance", "Cost", - "OperationalExcellence" + "OperationalExcellence", ], frequency: 30, state: "Active", - language: "en" - } + language: "en", + }, ], exclude: true, - lowCpuThreshold: "5" + lowCpuThreshold: "5", }; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.configurations.createInResourceGroup( configurationName, resourceGroup, - configContract + configContract, ); console.log(result); } -async function main() { +async function main(): Promise { putConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts index d831aaeb211f..8d317f6e52cf 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsCreateInSubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ConfigData, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json */ async function putConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const configurationName = "default"; const configContract: ConfigData = { digests: [ @@ -35,26 +32,26 @@ async function putConfigurations() { "Security", "Performance", "Cost", - "OperationalExcellence" + "OperationalExcellence", ], frequency: 30, state: "Active", - language: "en" - } + language: "en", + }, ], exclude: true, - lowCpuThreshold: "5" + lowCpuThreshold: "5", }; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.configurations.createInSubscription( configurationName, - configContract + configContract, ); console.log(result); } -async function main() { +async function main(): Promise { putConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts index 4d0c4bb3aa49..a08e2b94be04 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve Azure Advisor configurations. @@ -21,21 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json */ async function getConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const resourceGroup = "resourceGroup"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.configurations.listByResourceGroup( - resourceGroup - )) { + for await (let item of client.configurations.listByResourceGroup(resourceGroup)) { resArray.push(item); } console.log(resArray); } -async function main() { +async function main(): Promise { getConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts b/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts index 88ba94296258..9cdab732b93a 100644 --- a/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/configurationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json */ async function getConfigurations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); @@ -32,7 +29,7 @@ async function getConfigurations() { console.log(resArray); } -async function main() { +async function main(): Promise { getConfigurations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts index 2dd6575e121d..774cc17524c4 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the metadata entity. @@ -28,7 +26,7 @@ async function getMetadata() { console.log(result); } -async function main() { +async function main(): Promise { getMetadata(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts index 4e11deec80e0..298f38acb43e 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationMetadataListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of metadata entities. @@ -30,7 +28,7 @@ async function getMetadata() { console.log(resArray); } -async function main() { +async function main(): Promise { getMetadata(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts index 94d53c05e932..983a730b0e45 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGenerateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service. @@ -21,15 +19,14 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GenerateRecommendations.json */ async function generateRecommendations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const result = await client.recommendations.generate(); console.log(result); } -async function main() { +async function main(): Promise { generateRecommendations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts index 45039d31c025..0b3e09a34efa 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetGenerateStatusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/EmptyResponse.json */ async function getGenerateStatus() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const operationId = "operationGUID"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); @@ -30,7 +27,7 @@ async function getGenerateStatus() { console.log(result); } -async function main() { +async function main(): Promise { getGenerateStatus(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts index 5dab4d0e9900..283c7b7ee4c1 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains details of a cached recommendation. @@ -25,14 +23,11 @@ async function getRecommendationDetail() { const recommendationId = "recommendationId"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.recommendations.get( - resourceUri, - recommendationId - ); + const result = await client.recommendations.get(resourceUri, recommendationId); console.log(result); } -async function main() { +async function main(): Promise { getRecommendationDetail(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts b/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts index a31b8cfff9fb..cac103482dba 100644 --- a/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/recommendationsListSample.ts @@ -8,14 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - RecommendationsListOptionalParams, - AdvisorManagementClient -} from "@azure/arm-advisor"; +import { RecommendationsListOptionalParams, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations. @@ -24,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListRecommendations.json */ async function listRecommendations() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId"; const top = 10; const options: RecommendationsListOptionalParams = { top }; const credential = new DefaultAzureCredential(); @@ -37,7 +31,7 @@ async function listRecommendations() { console.log(resArray); } -async function main() { +async function main(): Promise { listRecommendations(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts index e6b9c7d4e41d..0b0a6a295e4e 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsCreateSample.ts @@ -8,14 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - SuppressionContract, - AdvisorManagementClient -} from "@azure/arm-advisor"; +import { SuppressionContract, AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation. @@ -34,12 +29,12 @@ async function createSuppression() { resourceUri, recommendationId, name, - suppressionContract + suppressionContract, ); console.log(result); } -async function main() { +async function main(): Promise { createSuppression(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts index 5d6929396d07..60acadc2203b 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. @@ -26,15 +24,11 @@ async function deleteSuppression() { const name = "suppressionName1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.suppressions.delete( - resourceUri, - recommendationId, - name - ); + const result = await client.suppressions.delete(resourceUri, recommendationId, name); console.log(result); } -async function main() { +async function main(): Promise { deleteSuppression(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts index 95f84bd2f7e4..e1c22b87d631 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Obtains the details of a suppression. @@ -26,15 +24,11 @@ async function getSuppressionDetail() { const name = "suppressionName1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential); - const result = await client.suppressions.get( - resourceUri, - recommendationId, - name - ); + const result = await client.suppressions.get(resourceUri, recommendationId, name); console.log(result); } -async function main() { +async function main(): Promise { getSuppressionDetail(); } diff --git a/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts b/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts index 359104e30b77..bb3696e9d435 100644 --- a/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts +++ b/sdk/advisor/arm-advisor/samples-dev/suppressionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AdvisorManagementClient } from "@azure/arm-advisor"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. @@ -21,8 +19,7 @@ dotenv.config(); * x-ms-original-file: specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListSuppressions.json */ async function listSuppressions() { - const subscriptionId = - process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId1"; + const subscriptionId = process.env["ADVISOR_SUBSCRIPTION_ID"] || "subscriptionId1"; const credential = new DefaultAzureCredential(); const client = new AdvisorManagementClient(credential, subscriptionId); const resArray = new Array(); @@ -32,7 +29,7 @@ async function listSuppressions() { console.log(resArray); } -async function main() { +async function main(): Promise { listSuppressions(); } diff --git a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts index b75c87872067..14e77a8b147d 100644 --- a/sdk/advisor/arm-advisor/src/advisorManagementClient.ts +++ b/sdk/advisor/arm-advisor/src/advisorManagementClient.ts @@ -8,27 +8,23 @@ 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 { PipelineRequest, PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { RecommendationMetadataImpl, ConfigurationsImpl, RecommendationsImpl, OperationsImpl, - SuppressionsImpl -} from "./operations"; + SuppressionsImpl, +} from "./operations/index.js"; import { RecommendationMetadata, Configurations, Recommendations, Operations, - Suppressions -} from "./operationsInterfaces"; -import { AdvisorManagementClientOptionalParams } from "./models"; + Suppressions, +} from "./operationsInterfaces/index.js"; +import { AdvisorManagementClientOptionalParams } from "./models/index.js"; export class AdvisorManagementClient extends coreClient.ServiceClient { $host: string; @@ -44,16 +40,16 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ); constructor( credentials: coreAuth.TokenCredential, subscriptionIdOrOptions?: AdvisorManagementClientOptionalParams | string, - options?: AdvisorManagementClientOptionalParams + options?: AdvisorManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -73,7 +69,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { } const defaults: AdvisorManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; const packageDetails = `azsdk-js-arm-advisor/3.2.0`; @@ -86,20 +82,19 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + 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(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -109,19 +104,17 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, + optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -145,10 +138,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { } const apiVersionPolicy = { name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { const param = request.url.split("?"); if (param.length > 1) { const newParams = param[1].split("&").map((item) => { @@ -161,7 +151,7 @@ export class AdvisorManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } diff --git a/sdk/advisor/arm-advisor/src/index.ts b/sdk/advisor/arm-advisor/src/index.ts index fb2b88124318..fc690e352ce1 100644 --- a/sdk/advisor/arm-advisor/src/index.ts +++ b/sdk/advisor/arm-advisor/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AdvisorManagementClient } from "./advisorManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AdvisorManagementClient } from "./advisorManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/advisor/arm-advisor/src/models/index.ts b/sdk/advisor/arm-advisor/src/models/index.ts index 8d7bcd4b406e..64c877e788aa 100644 --- a/sdk/advisor/arm-advisor/src/models/index.ts +++ b/sdk/advisor/arm-advisor/src/models/index.ts @@ -242,7 +242,7 @@ export interface RecommendationsGenerateHeaders { /** Known values of {@link Scenario} that the service accepts. */ export enum KnownScenario { /** Alerts */ - Alerts = "Alerts" + Alerts = "Alerts", } /** @@ -263,7 +263,7 @@ export enum KnownCpuThreshold { /** Fifteen */ Fifteen = "15", /** Twenty */ - Twenty = "20" + Twenty = "20", } /** @@ -289,7 +289,7 @@ export enum KnownCategory { /** Cost */ Cost = "Cost", /** OperationalExcellence */ - OperationalExcellence = "OperationalExcellence" + OperationalExcellence = "OperationalExcellence", } /** @@ -310,7 +310,7 @@ export enum KnownDigestConfigState { /** Active */ Active = "Active", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", } /** @@ -326,7 +326,7 @@ export type DigestConfigState = string; /** Known values of {@link ConfigurationName} that the service accepts. */ export enum KnownConfigurationName { /** Default */ - Default = "default" + Default = "default", } /** @@ -345,7 +345,7 @@ export enum KnownImpact { /** Medium */ Medium = "Medium", /** Low */ - Low = "Low" + Low = "Low", } /** @@ -366,7 +366,7 @@ export enum KnownRisk { /** Warning */ Warning = "Warning", /** None */ - None = "None" + None = "None", } /** @@ -381,22 +381,19 @@ export enum KnownRisk { export type Risk = string; /** Optional parameters. */ -export interface RecommendationMetadataGetOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type RecommendationMetadataGetResponse = MetadataEntity; /** Optional parameters. */ -export interface RecommendationMetadataListOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type RecommendationMetadataListResponse = MetadataEntityListResult; /** Optional parameters. */ -export interface RecommendationMetadataListNextOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationMetadataListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RecommendationMetadataListNextResponse = MetadataEntityListResult; @@ -437,8 +434,7 @@ export interface ConfigurationsListBySubscriptionNextOptionalParams export type ConfigurationsListBySubscriptionNextResponse = ConfigurationListResult; /** Optional parameters. */ -export interface RecommendationsGenerateOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsGenerateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the generate operation. */ export type RecommendationsGenerateResponse = RecommendationsGenerateHeaders; @@ -448,8 +444,7 @@ export interface RecommendationsGetGenerateStatusOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface RecommendationsListOptionalParams - extends coreClient.OperationOptions { +export interface RecommendationsListOptionalParams extends coreClient.OperationOptions { /** The filter to apply to the recommendations.
Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].
Example:
- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' */ filter?: string; /** The number of recommendations per page if a paged version of this API is being used. */ @@ -462,54 +457,46 @@ export interface RecommendationsListOptionalParams export type RecommendationsListResponse = ResourceRecommendationBaseListResult; /** Optional parameters. */ -export interface RecommendationsGetOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type RecommendationsGetResponse = ResourceRecommendationBase; /** Optional parameters. */ -export interface RecommendationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface RecommendationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RecommendationsListNextResponse = ResourceRecommendationBaseListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type OperationsListResponse = OperationEntityListResult; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationEntityListResult; /** Optional parameters. */ -export interface SuppressionsGetOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type SuppressionsGetResponse = SuppressionContract; /** Optional parameters. */ -export interface SuppressionsCreateOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsCreateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the create operation. */ export type SuppressionsCreateResponse = SuppressionContract; /** Optional parameters. */ -export interface SuppressionsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface SuppressionsListOptionalParams - extends coreClient.OperationOptions { +export interface SuppressionsListOptionalParams extends coreClient.OperationOptions { /** The number of suppressions per page if a paged version of this API is being used. */ top?: number; /** The page-continuation token to use with a paged version of this API. */ @@ -520,15 +507,13 @@ export interface SuppressionsListOptionalParams export type SuppressionsListResponse = SuppressionContractListResult; /** Optional parameters. */ -export interface SuppressionsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface SuppressionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type SuppressionsListNextResponse = SuppressionContractListResult; /** Optional parameters. */ -export interface AdvisorManagementClientOptionalParams - extends coreClient.ServiceClientOptions { +export interface AdvisorManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; /** Api Version */ diff --git a/sdk/advisor/arm-advisor/src/models/mappers.ts b/sdk/advisor/arm-advisor/src/models/mappers.ts index 50740e96e076..a841fea34aa9 100644 --- a/sdk/advisor/arm-advisor/src/models/mappers.ts +++ b/sdk/advisor/arm-advisor/src/models/mappers.ts @@ -16,26 +16,26 @@ export const MetadataEntity: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "properties.displayName", type: { - name: "String" - } + name: "String", + }, }, dependsOn: { serializedName: "properties.dependsOn", @@ -43,10 +43,10 @@ export const MetadataEntity: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, applicableScenarios: { serializedName: "properties.applicableScenarios", @@ -54,10 +54,10 @@ export const MetadataEntity: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, supportedValues: { serializedName: "properties.supportedValues", @@ -66,13 +66,13 @@ export const MetadataEntity: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetadataSupportedValueDetail" - } - } - } - } - } - } + className: "MetadataSupportedValueDetail", + }, + }, + }, + }, + }, + }, }; export const MetadataSupportedValueDetail: coreClient.CompositeMapper = { @@ -83,17 +83,17 @@ export const MetadataSupportedValueDetail: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ARMErrorResponseBody: coreClient.CompositeMapper = { @@ -104,17 +104,17 @@ export const ARMErrorResponseBody: coreClient.CompositeMapper = { message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, code: { serializedName: "code", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ArmErrorResponse: coreClient.CompositeMapper = { @@ -126,11 +126,11 @@ export const ArmErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ARMErrorResponseBody" - } - } - } - } + className: "ARMErrorResponseBody", + }, + }, + }, + }, }; export const MetadataEntityListResult: coreClient.CompositeMapper = { @@ -145,19 +145,19 @@ export const MetadataEntityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetadataEntity" - } - } - } + className: "MetadataEntity", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ConfigurationListResult: coreClient.CompositeMapper = { @@ -172,19 +172,19 @@ export const ConfigurationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ConfigData" - } - } - } + className: "ConfigData", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DigestConfig: coreClient.CompositeMapper = { @@ -195,20 +195,20 @@ export const DigestConfig: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, actionGroupResourceId: { serializedName: "actionGroupResourceId", type: { - name: "String" - } + name: "String", + }, }, frequency: { serializedName: "frequency", type: { - name: "Number" - } + name: "Number", + }, }, categories: { serializedName: "categories", @@ -216,25 +216,25 @@ export const DigestConfig: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, language: { serializedName: "language", type: { - name: "String" - } + name: "String", + }, }, state: { serializedName: "state", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -246,25 +246,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = { @@ -275,8 +275,8 @@ export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -285,13 +285,13 @@ export const ResourceRecommendationBaseListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "ResourceRecommendationBase" - } - } - } - } - } - } + className: "ResourceRecommendationBase", + }, + }, + }, + }, + }, + }, }; export const ShortDescription: coreClient.CompositeMapper = { @@ -302,17 +302,17 @@ export const ShortDescription: coreClient.CompositeMapper = { problem: { serializedName: "problem", type: { - name: "String" - } + name: "String", + }, }, solution: { serializedName: "solution", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceMetadata: coreClient.CompositeMapper = { @@ -323,38 +323,38 @@ export const ResourceMetadata: coreClient.CompositeMapper = { resourceId: { serializedName: "resourceId", type: { - name: "String" - } + name: "String", + }, }, source: { serializedName: "source", type: { - name: "String" - } + name: "String", + }, }, action: { serializedName: "action", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, singular: { serializedName: "singular", type: { - name: "String" - } + name: "String", + }, }, plural: { serializedName: "plural", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationEntityListResult: coreClient.CompositeMapper = { @@ -365,8 +365,8 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -375,13 +375,13 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OperationEntity" - } - } - } - } - } - } + className: "OperationEntity", + }, + }, + }, + }, + }, + }, }; export const OperationEntity: coreClient.CompositeMapper = { @@ -392,18 +392,18 @@ export const OperationEntity: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplayInfo" - } - } - } - } + className: "OperationDisplayInfo", + }, + }, + }, + }, }; export const OperationDisplayInfo: coreClient.CompositeMapper = { @@ -414,29 +414,29 @@ export const OperationDisplayInfo: coreClient.CompositeMapper = { description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SuppressionContractListResult: coreClient.CompositeMapper = { @@ -447,8 +447,8 @@ export const SuppressionContractListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -457,13 +457,13 @@ export const SuppressionContractListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SuppressionContract" - } - } - } - } - } - } + className: "SuppressionContract", + }, + }, + }, + }, + }, + }, }; export const ConfigData: coreClient.CompositeMapper = { @@ -475,14 +475,14 @@ export const ConfigData: coreClient.CompositeMapper = { exclude: { serializedName: "properties.exclude", type: { - name: "Boolean" - } + name: "Boolean", + }, }, lowCpuThreshold: { serializedName: "properties.lowCpuThreshold", type: { - name: "String" - } + name: "String", + }, }, digests: { serializedName: "properties.digests", @@ -491,13 +491,13 @@ export const ConfigData: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DigestConfig" - } - } - } - } - } - } + className: "DigestConfig", + }, + }, + }, + }, + }, + }, }; export const ResourceRecommendationBase: coreClient.CompositeMapper = { @@ -509,60 +509,60 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { category: { serializedName: "properties.category", type: { - name: "String" - } + name: "String", + }, }, impact: { serializedName: "properties.impact", type: { - name: "String" - } + name: "String", + }, }, impactedField: { serializedName: "properties.impactedField", type: { - name: "String" - } + name: "String", + }, }, impactedValue: { serializedName: "properties.impactedValue", type: { - name: "String" - } + name: "String", + }, }, lastUpdated: { serializedName: "properties.lastUpdated", type: { - name: "DateTime" - } + name: "DateTime", + }, }, metadata: { serializedName: "properties.metadata", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, recommendationTypeId: { serializedName: "properties.recommendationTypeId", type: { - name: "String" - } + name: "String", + }, }, risk: { serializedName: "properties.risk", type: { - name: "String" - } + name: "String", + }, }, shortDescription: { serializedName: "properties.shortDescription", type: { name: "Composite", - className: "ShortDescription" - } + className: "ShortDescription", + }, }, suppressionIds: { serializedName: "properties.suppressionIds", @@ -570,48 +570,48 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "Uuid" - } - } - } + name: "Uuid", + }, + }, + }, }, extendedProperties: { serializedName: "properties.extendedProperties", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, resourceMetadata: { serializedName: "properties.resourceMetadata", type: { name: "Composite", - className: "ResourceMetadata" - } + className: "ResourceMetadata", + }, }, description: { serializedName: "properties.description", type: { - name: "String" - } + name: "String", + }, }, label: { serializedName: "properties.label", type: { - name: "String" - } + name: "String", + }, }, learnMoreLink: { serializedName: "properties.learnMoreLink", type: { - name: "String" - } + name: "String", + }, }, potentialBenefits: { serializedName: "properties.potentialBenefits", type: { - name: "String" - } + name: "String", + }, }, actions: { serializedName: "properties.actions", @@ -621,32 +621,32 @@ export const ResourceRecommendationBase: coreClient.CompositeMapper = { type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + }, + }, }, remediation: { serializedName: "properties.remediation", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, }, exposedMetadataProperties: { serializedName: "properties.exposedMetadataProperties", type: { name: "Dictionary", value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } - } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + }, + }, + }, }; export const SuppressionContract: coreClient.CompositeMapper = { @@ -658,24 +658,24 @@ export const SuppressionContract: coreClient.CompositeMapper = { suppressionId: { serializedName: "properties.suppressionId", type: { - name: "String" - } + name: "String", + }, }, ttl: { serializedName: "properties.ttl", type: { - name: "String" - } + name: "String", + }, }, expirationTimeStamp: { serializedName: "properties.expirationTimeStamp", readOnly: true, type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const RecommendationsGenerateHeaders: coreClient.CompositeMapper = { @@ -686,15 +686,15 @@ export const RecommendationsGenerateHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, retryAfter: { serializedName: "retry-after", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; diff --git a/sdk/advisor/arm-advisor/src/models/parameters.ts b/sdk/advisor/arm-advisor/src/models/parameters.ts index 3dbd23be6ada..3e8f56f67a4b 100644 --- a/sdk/advisor/arm-advisor/src/models/parameters.ts +++ b/sdk/advisor/arm-advisor/src/models/parameters.ts @@ -9,12 +9,12 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { ConfigData as ConfigDataMapper, - SuppressionContract as SuppressionContractMapper -} from "../models/mappers"; + SuppressionContract as SuppressionContractMapper, +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", @@ -23,9 +23,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -34,10 +34,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const name: OperationURLParameter = { @@ -46,9 +46,9 @@ export const name: OperationURLParameter = { serializedName: "name", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apiVersion: OperationQueryParameter = { @@ -58,9 +58,9 @@ export const apiVersion: OperationQueryParameter = { isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -69,10 +69,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { @@ -81,9 +81,9 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -93,14 +93,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const configContract: OperationParameter = { parameterPath: "configContract", - mapper: ConfigDataMapper + mapper: ConfigDataMapper, }; export const configurationName: OperationURLParameter = { @@ -109,9 +109,9 @@ export const configurationName: OperationURLParameter = { serializedName: "configurationName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceGroup: OperationURLParameter = { @@ -120,9 +120,9 @@ export const resourceGroup: OperationURLParameter = { serializedName: "resourceGroup", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const operationId: OperationURLParameter = { @@ -131,9 +131,9 @@ export const operationId: OperationURLParameter = { serializedName: "operationId", required: true, type: { - name: "Uuid" - } - } + name: "Uuid", + }, + }, }; export const filter: OperationQueryParameter = { @@ -141,9 +141,9 @@ export const filter: OperationQueryParameter = { mapper: { serializedName: "$filter", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const top: OperationQueryParameter = { @@ -151,9 +151,9 @@ export const top: OperationQueryParameter = { mapper: { serializedName: "$top", type: { - name: "Number" - } - } + name: "Number", + }, + }, }; export const skipToken: OperationQueryParameter = { @@ -161,9 +161,9 @@ export const skipToken: OperationQueryParameter = { mapper: { serializedName: "$skipToken", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceUri: OperationURLParameter = { @@ -172,9 +172,9 @@ export const resourceUri: OperationURLParameter = { serializedName: "resourceUri", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const recommendationId: OperationURLParameter = { @@ -183,12 +183,12 @@ export const recommendationId: OperationURLParameter = { serializedName: "recommendationId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const suppressionContract: OperationParameter = { parameterPath: "suppressionContract", - mapper: SuppressionContractMapper + mapper: SuppressionContractMapper, }; diff --git a/sdk/advisor/arm-advisor/src/operations/configurations.ts b/sdk/advisor/arm-advisor/src/operations/configurations.ts index 4ffa9c9d4b15..82b2bada8e1a 100644 --- a/sdk/advisor/arm-advisor/src/operations/configurations.ts +++ b/sdk/advisor/arm-advisor/src/operations/configurations.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Configurations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Configurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { ConfigData, ConfigurationsListBySubscriptionNextOptionalParams, @@ -25,8 +25,8 @@ import { ConfigurationsCreateInSubscriptionResponse, ConfigurationsCreateInResourceGroupOptionalParams, ConfigurationsCreateInResourceGroupResponse, - ConfigurationsListBySubscriptionNextResponse -} from "../models"; + ConfigurationsListBySubscriptionNextResponse, +} from "../models/index.js"; /// /** Class containing Configurations operations. */ @@ -46,7 +46,7 @@ export class ConfigurationsImpl implements Configurations { * @param options The options parameters. */ public listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { @@ -61,13 +61,13 @@ export class ConfigurationsImpl implements Configurations { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( options?: ConfigurationsListBySubscriptionOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationsListBySubscriptionResponse; let continuationToken = settings?.continuationToken; @@ -88,7 +88,7 @@ export class ConfigurationsImpl implements Configurations { } private async *listBySubscriptionPagingAll( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; @@ -102,7 +102,7 @@ export class ConfigurationsImpl implements Configurations { */ public listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroup, options); return { @@ -116,19 +116,15 @@ export class ConfigurationsImpl implements Configurations { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroup, - options, - settings - ); - } + return this.listByResourceGroupPagingPage(resourceGroup, options, settings); + }, }; } private async *listByResourceGroupPagingPage( resourceGroup: string, options?: ConfigurationsListByResourceGroupOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationsListByResourceGroupResponse; result = await this._listByResourceGroup(resourceGroup, options); @@ -137,12 +133,9 @@ export class ConfigurationsImpl implements Configurations { private async *listByResourceGroupPagingAll( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroup, - options - )) { + for await (const page of this.listByResourceGroupPagingPage(resourceGroup, options)) { yield* page; } } @@ -152,12 +145,9 @@ export class ConfigurationsImpl implements Configurations { * @param options The options parameters. */ private _listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); + return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); } /** @@ -170,11 +160,11 @@ export class ConfigurationsImpl implements Configurations { createInSubscription( configurationName: ConfigurationName, configContract: ConfigData, - options?: ConfigurationsCreateInSubscriptionOptionalParams + options?: ConfigurationsCreateInSubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { configurationName, configContract, options }, - createInSubscriptionOperationSpec + createInSubscriptionOperationSpec, ); } @@ -185,11 +175,11 @@ export class ConfigurationsImpl implements Configurations { */ private _listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroup, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -204,11 +194,11 @@ export class ConfigurationsImpl implements Configurations { configurationName: ConfigurationName, resourceGroup: string, configContract: ConfigData, - options?: ConfigurationsCreateInResourceGroupOptionalParams + options?: ConfigurationsCreateInResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { configurationName, resourceGroup, configContract, options }, - createInResourceGroupOperationSpec + createInResourceGroupOperationSpec, ); } @@ -219,11 +209,11 @@ export class ConfigurationsImpl implements Configurations { */ private _listBySubscriptionNext( nextLink: string, - options?: ConfigurationsListBySubscriptionNextOptionalParams + options?: ConfigurationsListBySubscriptionNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listBySubscriptionNextOperationSpec + listBySubscriptionNextOperationSpec, ); } } @@ -231,77 +221,65 @@ export class ConfigurationsImpl implements Configurations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const createInSubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfigData + bodyMapper: Mappers.ConfigData, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.configContract, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.configurationName - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.configurationName], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroup - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroup], headerParameters: [Parameters.accept], - serializer + serializer, }; const createInResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfigData + bodyMapper: Mappers.ConfigData, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.configContract, queryParameters: [Parameters.apiVersion], @@ -309,28 +287,24 @@ const createInResourceGroupOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.configurationName, - Parameters.resourceGroup + Parameters.resourceGroup, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.ConfigurationListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/index.ts b/sdk/advisor/arm-advisor/src/operations/index.ts index 9bb829013597..e1c83e6278f2 100644 --- a/sdk/advisor/arm-advisor/src/operations/index.ts +++ b/sdk/advisor/arm-advisor/src/operations/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recommendationMetadata"; -export * from "./configurations"; -export * from "./recommendations"; -export * from "./operations"; -export * from "./suppressions"; +export * from "./recommendationMetadata.js"; +export * from "./configurations.js"; +export * from "./recommendations.js"; +export * from "./operations.js"; +export * from "./suppressions.js"; diff --git a/sdk/advisor/arm-advisor/src/operations/operations.ts b/sdk/advisor/arm-advisor/src/operations/operations.ts index 72da2ab84d67..728de7862368 100644 --- a/sdk/advisor/arm-advisor/src/operations/operations.ts +++ b/sdk/advisor/arm-advisor/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { OperationEntity, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse -} from "../models"; + OperationsListNextResponse, +} from "../models/index.js"; /// /** Class containing Operations operations. */ @@ -38,9 +38,7 @@ export class OperationsImpl implements Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -54,13 +52,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +79,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -92,9 +90,7 @@ export class OperationsImpl implements Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - private _list( - options?: OperationsListOptionalParams - ): Promise { + private _list(options?: OperationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,12 +101,9 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -121,29 +114,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationEntityListResult + bodyMapper: Mappers.OperationEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationEntityListResult + bodyMapper: Mappers.OperationEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts index f4f78ffad8e8..8333a6bb4b7e 100644 --- a/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts +++ b/sdk/advisor/arm-advisor/src/operations/recommendationMetadata.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RecommendationMetadata } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RecommendationMetadata } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { MetadataEntity, RecommendationMetadataListNextOptionalParams, @@ -20,8 +20,8 @@ import { RecommendationMetadataListResponse, RecommendationMetadataGetOptionalParams, RecommendationMetadataGetResponse, - RecommendationMetadataListNextResponse -} from "../models"; + RecommendationMetadataListNextResponse, +} from "../models/index.js"; /// /** Class containing RecommendationMetadata operations. */ @@ -41,7 +41,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { * @param options The options parameters. */ public list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -56,13 +56,13 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: RecommendationMetadataListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: RecommendationMetadataListResponse; let continuationToken = settings?.continuationToken; @@ -83,7 +83,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { } private async *listPagingAll( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -97,12 +97,9 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { */ get( name: string, - options?: RecommendationMetadataGetOptionalParams + options?: RecommendationMetadataGetOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { name, options }, - getOperationSpec - ); + return this.client.sendOperationRequest({ name, options }, getOperationSpec); } /** @@ -110,7 +107,7 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { * @param options The options parameters. */ private _list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -122,12 +119,9 @@ export class RecommendationMetadataImpl implements RecommendationMetadata { */ private _listNext( nextLink: string, - options?: RecommendationMetadataListNextOptionalParams + options?: RecommendationMetadataListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -138,49 +132,49 @@ const getOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntity + bodyMapper: Mappers.MetadataEntity, }, 404: { bodyMapper: Mappers.ARMErrorResponseBody, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.name], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { path: "/providers/Microsoft.Advisor/metadata", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntityListResult + bodyMapper: Mappers.MetadataEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MetadataEntityListResult + bodyMapper: Mappers.MetadataEntityListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/recommendations.ts b/sdk/advisor/arm-advisor/src/operations/recommendations.ts index 40cf166ca9f1..33e0f9e8553f 100644 --- a/sdk/advisor/arm-advisor/src/operations/recommendations.ts +++ b/sdk/advisor/arm-advisor/src/operations/recommendations.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Recommendations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Recommendations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { ResourceRecommendationBase, RecommendationsListNextOptionalParams, @@ -23,8 +23,8 @@ import { RecommendationsGetGenerateStatusOptionalParams, RecommendationsGetOptionalParams, RecommendationsGetResponse, - RecommendationsListNextResponse -} from "../models"; + RecommendationsListNextResponse, +} from "../models/index.js"; /// /** Class containing Recommendations operations. */ @@ -45,7 +45,7 @@ export class RecommendationsImpl implements Recommendations { * @param options The options parameters. */ public list( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -60,13 +60,13 @@ export class RecommendationsImpl implements Recommendations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: RecommendationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: RecommendationsListResponse; let continuationToken = settings?.continuationToken; @@ -87,7 +87,7 @@ export class RecommendationsImpl implements Recommendations { } private async *listPagingAll( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -100,7 +100,7 @@ export class RecommendationsImpl implements Recommendations { * @param options The options parameters. */ generate( - options?: RecommendationsGenerateOptionalParams + options?: RecommendationsGenerateOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, generateOperationSpec); } @@ -115,11 +115,11 @@ export class RecommendationsImpl implements Recommendations { */ getGenerateStatus( operationId: string, - options?: RecommendationsGetGenerateStatusOptionalParams + options?: RecommendationsGetGenerateStatusOptionalParams, ): Promise { return this.client.sendOperationRequest( { operationId, options }, - getGenerateStatusOperationSpec + getGenerateStatusOperationSpec, ); } @@ -128,9 +128,7 @@ export class RecommendationsImpl implements Recommendations { * invoking generateRecommendations. * @param options The options parameters. */ - private _list( - options?: RecommendationsListOptionalParams - ): Promise { + private _list(options?: RecommendationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -144,11 +142,11 @@ export class RecommendationsImpl implements Recommendations { get( resourceUri: string, recommendationId: string, - options?: RecommendationsGetOptionalParams + options?: RecommendationsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, options }, - getOperationSpec + getOperationSpec, ); } @@ -159,113 +157,89 @@ export class RecommendationsImpl implements Recommendations { */ private _listNext( nextLink: string, - options?: RecommendationsListNextOptionalParams + options?: RecommendationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const generateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations", httpMethod: "POST", responses: { 202: { - headersMapper: Mappers.RecommendationsGenerateHeaders + headersMapper: Mappers.RecommendationsGenerateHeaders, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getGenerateStatusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}", httpMethod: "GET", responses: { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.operationId - ], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.operationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBaseListResult + bodyMapper: Mappers.ResourceRecommendationBaseListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skipToken - ], + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top, Parameters.skipToken], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBase + bodyMapper: Mappers.ResourceRecommendationBase, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.recommendationId - ], + urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.recommendationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ResourceRecommendationBaseListResult + bodyMapper: Mappers.ResourceRecommendationBaseListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operations/suppressions.ts b/sdk/advisor/arm-advisor/src/operations/suppressions.ts index 464c5d42dd1a..e23f5bae5630 100644 --- a/sdk/advisor/arm-advisor/src/operations/suppressions.ts +++ b/sdk/advisor/arm-advisor/src/operations/suppressions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Suppressions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Suppressions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AdvisorManagementClient } from "../advisorManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AdvisorManagementClient } from "../advisorManagementClient.js"; import { SuppressionContract, SuppressionsListNextOptionalParams, @@ -23,8 +23,8 @@ import { SuppressionsCreateOptionalParams, SuppressionsCreateResponse, SuppressionsDeleteOptionalParams, - SuppressionsListNextResponse -} from "../models"; + SuppressionsListNextResponse, +} from "../models/index.js"; /// /** Class containing Suppressions operations. */ @@ -45,7 +45,7 @@ export class SuppressionsImpl implements Suppressions { * @param options The options parameters. */ public list( - options?: SuppressionsListOptionalParams + options?: SuppressionsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -60,13 +60,13 @@ export class SuppressionsImpl implements Suppressions { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: SuppressionsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: SuppressionsListResponse; let continuationToken = settings?.continuationToken; @@ -87,7 +87,7 @@ export class SuppressionsImpl implements Suppressions { } private async *listPagingAll( - options?: SuppressionsListOptionalParams + options?: SuppressionsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -106,11 +106,11 @@ export class SuppressionsImpl implements Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsGetOptionalParams + options?: SuppressionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, options }, - getOperationSpec + getOperationSpec, ); } @@ -130,11 +130,11 @@ export class SuppressionsImpl implements Suppressions { recommendationId: string, name: string, suppressionContract: SuppressionContract, - options?: SuppressionsCreateOptionalParams + options?: SuppressionsCreateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, suppressionContract, options }, - createOperationSpec + createOperationSpec, ); } @@ -151,11 +151,11 @@ export class SuppressionsImpl implements Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsDeleteOptionalParams + options?: SuppressionsDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, recommendationId, name, options }, - deleteOperationSpec + deleteOperationSpec, ); } @@ -164,9 +164,7 @@ export class SuppressionsImpl implements Suppressions { * attribute of a recommendation is referred to as a suppression. * @param options The options parameters. */ - private _list( - options?: SuppressionsListOptionalParams - ): Promise { + private _list(options?: SuppressionsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -177,58 +175,53 @@ export class SuppressionsImpl implements Suppressions { */ private _listNext( nextLink: string, - options?: SuppressionsListNextOptionalParams + options?: SuppressionsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContract + bodyMapper: Mappers.SuppressionContract, }, 404: { bodyMapper: Mappers.ArmErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.SuppressionContract + bodyMapper: Mappers.SuppressionContract, }, 404: { bodyMapper: Mappers.ArmErrorResponse, - isError: true + isError: true, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, requestBody: Parameters.suppressionContract, queryParameters: [Parameters.apiVersion], @@ -236,69 +229,59 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", + path: "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", httpMethod: "DELETE", responses: { 204: {}, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.name, Parameters.resourceUri, - Parameters.recommendationId + Parameters.recommendationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContractListResult + bodyMapper: Mappers.SuppressionContractListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skipToken - ], + queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SuppressionContractListResult + bodyMapper: Mappers.SuppressionContractListResult, }, default: { - bodyMapper: Mappers.ArmErrorResponse - } + bodyMapper: Mappers.ArmErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts index 6348b04fa796..f090206fed67 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/configurations.ts @@ -15,8 +15,8 @@ import { ConfigurationsCreateInSubscriptionOptionalParams, ConfigurationsCreateInSubscriptionResponse, ConfigurationsCreateInResourceGroupOptionalParams, - ConfigurationsCreateInResourceGroupResponse -} from "../models"; + ConfigurationsCreateInResourceGroupResponse, +} from "../models/index.js"; /// /** Interface representing a Configurations. */ @@ -26,7 +26,7 @@ export interface Configurations { * @param options The options parameters. */ listBySubscription( - options?: ConfigurationsListBySubscriptionOptionalParams + options?: ConfigurationsListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * Retrieve Azure Advisor configurations. @@ -35,7 +35,7 @@ export interface Configurations { */ listByResourceGroup( resourceGroup: string, - options?: ConfigurationsListByResourceGroupOptionalParams + options?: ConfigurationsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Create/Overwrite Azure Advisor configuration and also delete all configurations of contained @@ -47,7 +47,7 @@ export interface Configurations { createInSubscription( configurationName: ConfigurationName, configContract: ConfigData, - options?: ConfigurationsCreateInSubscriptionOptionalParams + options?: ConfigurationsCreateInSubscriptionOptionalParams, ): Promise; /** * Create/Overwrite Azure Advisor configuration. @@ -60,6 +60,6 @@ export interface Configurations { configurationName: ConfigurationName, resourceGroup: string, configContract: ConfigData, - options?: ConfigurationsCreateInResourceGroupOptionalParams + options?: ConfigurationsCreateInResourceGroupOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts index 9bb829013597..e1c83e6278f2 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recommendationMetadata"; -export * from "./configurations"; -export * from "./recommendations"; -export * from "./operations"; -export * from "./suppressions"; +export * from "./recommendationMetadata.js"; +export * from "./configurations.js"; +export * from "./recommendations.js"; +export * from "./operations.js"; +export * from "./suppressions.js"; diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts index fc17cdc3730d..83ea6289c6c1 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { OperationEntity, OperationsListOptionalParams } from "../models"; +import { OperationEntity, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ @@ -16,7 +16,5 @@ export interface Operations { * Lists all the available Advisor REST API operations. * @param options The options parameters. */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts index 25f10223c816..e5b1b31c9bc6 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendationMetadata.ts @@ -11,8 +11,8 @@ import { MetadataEntity, RecommendationMetadataListOptionalParams, RecommendationMetadataGetOptionalParams, - RecommendationMetadataGetResponse -} from "../models"; + RecommendationMetadataGetResponse, +} from "../models/index.js"; /// /** Interface representing a RecommendationMetadata. */ @@ -22,7 +22,7 @@ export interface RecommendationMetadata { * @param options The options parameters. */ list( - options?: RecommendationMetadataListOptionalParams + options?: RecommendationMetadataListOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the metadata entity. @@ -31,6 +31,6 @@ export interface RecommendationMetadata { */ get( name: string, - options?: RecommendationMetadataGetOptionalParams + options?: RecommendationMetadataGetOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts index 6a3311d189d0..185e896dc2ba 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/recommendations.ts @@ -14,8 +14,8 @@ import { RecommendationsGenerateResponse, RecommendationsGetGenerateStatusOptionalParams, RecommendationsGetOptionalParams, - RecommendationsGetResponse -} from "../models"; + RecommendationsGetResponse, +} from "../models/index.js"; /// /** Interface representing a Recommendations. */ @@ -26,7 +26,7 @@ export interface Recommendations { * @param options The options parameters. */ list( - options?: RecommendationsListOptionalParams + options?: RecommendationsListOptionalParams, ): PagedAsyncIterableIterator; /** * Initiates the recommendation generation or computation process for a subscription. This operation is @@ -34,7 +34,7 @@ export interface Recommendations { * @param options The options parameters. */ generate( - options?: RecommendationsGenerateOptionalParams + options?: RecommendationsGenerateOptionalParams, ): Promise; /** * Retrieves the status of the recommendation computation or generation process. Invoke this API after @@ -46,7 +46,7 @@ export interface Recommendations { */ getGenerateStatus( operationId: string, - options?: RecommendationsGetGenerateStatusOptionalParams + options?: RecommendationsGetGenerateStatusOptionalParams, ): Promise; /** * Obtains details of a cached recommendation. @@ -58,6 +58,6 @@ export interface Recommendations { get( resourceUri: string, recommendationId: string, - options?: RecommendationsGetOptionalParams + options?: RecommendationsGetOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts b/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts index f2f0bae319d1..21fab729e75d 100644 --- a/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts +++ b/sdk/advisor/arm-advisor/src/operationsInterfaces/suppressions.ts @@ -14,8 +14,8 @@ import { SuppressionsGetResponse, SuppressionsCreateOptionalParams, SuppressionsCreateResponse, - SuppressionsDeleteOptionalParams -} from "../models"; + SuppressionsDeleteOptionalParams, +} from "../models/index.js"; /// /** Interface representing a Suppressions. */ @@ -25,9 +25,7 @@ export interface Suppressions { * attribute of a recommendation is referred to as a suppression. * @param options The options parameters. */ - list( - options?: SuppressionsListOptionalParams - ): PagedAsyncIterableIterator; + list(options?: SuppressionsListOptionalParams): PagedAsyncIterableIterator; /** * Obtains the details of a suppression. * @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which @@ -40,7 +38,7 @@ export interface Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsGetOptionalParams + options?: SuppressionsGetOptionalParams, ): Promise; /** * Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute @@ -58,7 +56,7 @@ export interface Suppressions { recommendationId: string, name: string, suppressionContract: SuppressionContract, - options?: SuppressionsCreateOptionalParams + options?: SuppressionsCreateOptionalParams, ): Promise; /** * Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute @@ -73,6 +71,6 @@ export interface Suppressions { resourceUri: string, recommendationId: string, name: string, - options?: SuppressionsDeleteOptionalParams + options?: SuppressionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/advisor/arm-advisor/src/pagingHelper.ts b/sdk/advisor/arm-advisor/src/pagingHelper.ts index 269a2b9814b5..e362819bdfc4 100644 --- a/sdk/advisor/arm-advisor/src/pagingHelper.ts +++ b/sdk/advisor/arm-advisor/src/pagingHelper.ts @@ -26,10 +26,7 @@ export function getContinuationToken(page: unknown): string | undefined { return pageMap.get(page)?.continuationToken; } -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined -): void { +export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { if (typeof page !== "object" || page === null || !continuationToken) { return; } diff --git a/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts b/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts index 7d68a77df32f..5da0d6004696 100644 --- a/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts +++ b/sdk/advisor/arm-advisor/test/advisor_operations_test.spec.ts @@ -6,24 +6,17 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; +import { env, Recorder, RecorderStartOptions, isPlaybackMode } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AdvisorManagementClient } from "../src/advisorManagementClient"; -import { RecommendationsListOptionalParams } from "../src/models"; +import { AdvisorManagementClient } from "../src/advisorManagementClient.js"; +import { RecommendationsListOptionalParams } from "../src/models/index.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; 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" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -42,33 +35,32 @@ describe("Advisor test", () => { let recorder: Recorder; let subscriptionId: string; let client: AdvisorManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); - client = new AdvisorManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - + client = new AdvisorManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("recommendations list test", async function () { + it("recommendations list test", async () => { const top = 5; const options: RecommendationsListOptionalParams = { top }; const resArray = new Array(); for await (let item of client.recommendations.list(options)) { resArray.push(item); } + + assert(resArray.length > 0); }); -}) +}); diff --git a/sdk/advisor/arm-advisor/tsconfig.json b/sdk/advisor/arm-advisor/tsconfig.json index 35219d45119e..19ceb382b521 100644 --- a/sdk/advisor/arm-advisor/tsconfig.json +++ b/sdk/advisor/arm-advisor/tsconfig.json @@ -1,33 +1,13 @@ { - "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, - "paths": { - "@azure/arm-advisor": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/advisor/arm-advisor/tsconfig.samples.json b/sdk/advisor/arm-advisor/tsconfig.samples.json new file mode 100644 index 000000000000..a768f339a987 --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.samples.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-advisor": ["./dist/esm"] + } + } +} diff --git a/sdk/advisor/arm-advisor/tsconfig.src.json b/sdk/advisor/arm-advisor/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/advisor/arm-advisor/tsconfig.test.json b/sdk/advisor/arm-advisor/tsconfig.test.json new file mode 100644 index 000000000000..290ca214aebc --- /dev/null +++ b/sdk/advisor/arm-advisor/tsconfig.test.json @@ -0,0 +1,3 @@ +{ + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] +} diff --git a/sdk/advisor/arm-advisor/vitest.config.ts b/sdk/advisor/arm-advisor/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/advisor/arm-advisor/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/advisor/arm-advisor/vitest.esm.config.ts b/sdk/advisor/arm-advisor/vitest.esm.config.ts new file mode 100644 index 000000000000..2f6e757a54f7 --- /dev/null +++ b/sdk/advisor/arm-advisor/vitest.esm.config.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/agrifood/arm-agrifood/api-extractor.json b/sdk/agrifood/arm-agrifood/api-extractor.json index 42728bb72003..769055baa8bf 100644 --- a/sdk/agrifood/arm-agrifood/api-extractor.json +++ b/sdk/agrifood/arm-agrifood/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-agrifood.d.ts" + "publicTrimmedFilePath": "dist/arm-agrifood.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/agrifood/arm-agrifood/package.json b/sdk/agrifood/arm-agrifood/package.json index f3bc5ccadd0f..d21252b679e7 100644 --- a/sdk/agrifood/arm-agrifood/package.json +++ b/sdk/agrifood/arm-agrifood/package.json @@ -8,65 +8,51 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.6.1", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-agrifood.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", + "@azure/identity": "^4.5.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@vitest/coverage-istanbul": "^2.1.8", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/agrifood/arm-agrifood", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, + "repository": "github:Azure/azure-sdk-for-js", "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", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -108,5 +94,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-agrifood?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts index 0b06709a1d0d..7cded6dfbdf7 100644 --- a/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts +++ b/sdk/agrifood/arm-agrifood/src/agriFoodMgmtClient.ts @@ -22,7 +22,7 @@ import { OperationsImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl -} from "./operations"; +} from "./operations/index.js"; import { Extensions, FarmBeatsExtensions, @@ -31,8 +31,8 @@ import { Operations, PrivateEndpointConnections, PrivateLinkResources -} from "./operationsInterfaces"; -import { AgriFoodMgmtClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { AgriFoodMgmtClientOptionalParams } from "./models/index.js"; export class AgriFoodMgmtClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/agrifood/arm-agrifood/src/index.ts b/sdk/agrifood/arm-agrifood/src/index.ts index 5b895ab1b95a..89d006ca8e0f 100644 --- a/sdk/agrifood/arm-agrifood/src/index.ts +++ b/sdk/agrifood/arm-agrifood/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AgriFoodMgmtClient } from "./agriFoodMgmtClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AgriFoodMgmtClient } from "./agriFoodMgmtClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/agrifood/arm-agrifood/src/models/parameters.ts b/sdk/agrifood/arm-agrifood/src/models/parameters.ts index 70661aac7c42..6b9751fc40fa 100644 --- a/sdk/agrifood/arm-agrifood/src/models/parameters.ts +++ b/sdk/agrifood/arm-agrifood/src/models/parameters.ts @@ -16,7 +16,7 @@ import { FarmBeatsUpdateRequestModel as FarmBeatsUpdateRequestModelMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts index fae4ddfd71b0..18952523ec76 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/extensions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Extensions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Extensions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { Extension, ExtensionsListByFarmBeatsNextOptionalParams, @@ -26,7 +26,7 @@ import { ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams, ExtensionsListByFarmBeatsNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Extensions operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts index 21fd45a22a6d..015013a981be 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsExtensions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsExtensions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { FarmBeatsExtensions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { FarmBeatsExtension, FarmBeatsExtensionsListNextOptionalParams, @@ -21,7 +21,7 @@ import { FarmBeatsExtensionsGetOptionalParams, FarmBeatsExtensionsGetResponse, FarmBeatsExtensionsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing FarmBeatsExtensions operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts index f0e4e6f98508..0d16d12ab256 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/farmBeatsModels.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { FarmBeatsModels } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { FarmBeatsModels } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { FarmBeats, FarmBeatsModelsListBySubscriptionNextOptionalParams, @@ -35,7 +35,7 @@ import { FarmBeatsModelsGetOperationResultResponse, FarmBeatsModelsListBySubscriptionNextResponse, FarmBeatsModelsListByResourceGroupNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing FarmBeatsModels operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/index.ts b/sdk/agrifood/arm-agrifood/src/operations/index.ts index a08b7e34e1dd..9da4e40e6d66 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./extensions.js"; +export * from "./farmBeatsExtensions.js"; +export * from "./farmBeatsModels.js"; +export * from "./locations.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/agrifood/arm-agrifood/src/operations/locations.ts b/sdk/agrifood/arm-agrifood/src/operations/locations.ts index 3d24e5b732b9..c2a367458761 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/locations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/locations.ts @@ -6,16 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Locations } from "../operationsInterfaces"; +import { Locations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { CheckNameAvailabilityRequest, LocationsCheckNameAvailabilityOptionalParams, LocationsCheckNameAvailabilityResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Locations operations. */ export class LocationsImpl implements Locations { diff --git a/sdk/agrifood/arm-agrifood/src/operations/operations.ts b/sdk/agrifood/arm-agrifood/src/operations/operations.ts index f63b79ac1d80..f72cfcc6db4e 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts index 41581045d45d..ece79b38ea82 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateEndpointConnections.ts @@ -7,13 +7,13 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByResourceOptionalParams, @@ -23,7 +23,7 @@ import { PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts index 2696b45ffd3f..ca1090f28aa6 100644 --- a/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operations/privateLinkResources.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AgriFoodMgmtClient } from "../agriFoodMgmtClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AgriFoodMgmtClient } from "../agriFoodMgmtClient.js"; import { PrivateLinkResource, PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesListByResourceResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts index 985a7ed1eb1c..00fc50dd86c5 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/extensions.ts @@ -17,7 +17,7 @@ import { ExtensionsUpdateOptionalParams, ExtensionsUpdateResponse, ExtensionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Extensions. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts index 297061be8aa3..0f2da9f0b8b4 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsExtensions.ts @@ -12,7 +12,7 @@ import { FarmBeatsExtensionsListOptionalParams, FarmBeatsExtensionsGetOptionalParams, FarmBeatsExtensionsGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a FarmBeatsExtensions. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts index c23cb34a6ed6..ac1fd68a2bd4 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/farmBeatsModels.ts @@ -22,7 +22,7 @@ import { FarmBeatsModelsDeleteOptionalParams, FarmBeatsModelsGetOperationResultOptionalParams, FarmBeatsModelsGetOperationResultResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a FarmBeatsModels. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts index a08b7e34e1dd..9da4e40e6d66 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./extensions"; -export * from "./farmBeatsExtensions"; -export * from "./farmBeatsModels"; -export * from "./locations"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./extensions.js"; +export * from "./farmBeatsExtensions.js"; +export * from "./farmBeatsModels.js"; +export * from "./locations.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts index 37298457c7c5..328d6332c1c2 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/locations.ts @@ -10,7 +10,7 @@ import { CheckNameAvailabilityRequest, LocationsCheckNameAvailabilityOptionalParams, LocationsCheckNameAvailabilityResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Locations. */ export interface Locations { diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts index 59cc6551a887..f5fb6402431c 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts index bafe92b91a36..ef6c9ba51ea0 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateEndpointConnections.ts @@ -16,7 +16,7 @@ import { PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts index 1aa8e6a22d38..f483b5766a0b 100644 --- a/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/agrifood/arm-agrifood/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/agrifood/arm-agrifood/test/sampleTest.ts b/sdk/agrifood/arm-agrifood/test/sample.spec.ts similarity index 69% rename from sdk/agrifood/arm-agrifood/test/sampleTest.ts rename to sdk/agrifood/arm-agrifood/test/sample.spec.ts index 8ff7deb0acbe..a9efe7d1f051 100644 --- a/sdk/agrifood/arm-agrifood/test/sampleTest.ts +++ b/sdk/agrifood/arm-agrifood/test/sample.spec.ts @@ -6,19 +6,14 @@ * 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"; +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; 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" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -32,16 +27,16 @@ const recorderOptions: RecorderStartOptions = { describe("My test", () => { let recorder: Recorder; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("sample test", async function () { - console.log("Hi, I'm a test!"); + it("sample test", async () => { + assert.isTrue(true); }); }); diff --git a/sdk/agrifood/arm-agrifood/tsconfig.json b/sdk/agrifood/arm-agrifood/tsconfig.json index 67feca918942..19ceb382b521 100644 --- a/sdk/agrifood/arm-agrifood/tsconfig.json +++ b/sdk/agrifood/arm-agrifood/tsconfig.json @@ -1,33 +1,13 @@ { - "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, - "paths": { - "@azure/arm-agrifood": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.samples.json b/sdk/agrifood/arm-agrifood/tsconfig.samples.json new file mode 100644 index 000000000000..a2661ae2e9b7 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-agrifood": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.src.json b/sdk/agrifood/arm-agrifood/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/agrifood/arm-agrifood/tsconfig.test.json b/sdk/agrifood/arm-agrifood/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/agrifood/arm-agrifood/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/agrifood/arm-agrifood/vitest.config.ts b/sdk/agrifood/arm-agrifood/vitest.config.ts new file mode 100644 index 000000000000..5c472252eb10 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/vitest.config.ts @@ -0,0 +1,8 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default viteConfig; diff --git a/sdk/agrifood/arm-agrifood/vitest.esm.config.ts b/sdk/agrifood/arm-agrifood/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/agrifood/arm-agrifood/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/apicenter/arm-apicenter/api-extractor.json b/sdk/apicenter/arm-apicenter/api-extractor.json index fca682f902c1..6794589f524a 100644 --- a/sdk/apicenter/arm-apicenter/api-extractor.json +++ b/sdk/apicenter/arm-apicenter/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-apicenter.d.ts" + "publicTrimmedFilePath": "dist/arm-apicenter.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/apicenter/arm-apicenter/package.json b/sdk/apicenter/arm-apicenter/package.json index 50ec8d23d84e..a5875d01363c 100644 --- a/sdk/apicenter/arm-apicenter/package.json +++ b/sdk/apicenter/arm-apicenter/package.json @@ -8,65 +8,51 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.14.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", + "tslib": "^2.8.1" }, "keywords": [ "node", "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-apicenter.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, + "repository": "github:Azure/azure-sdk-for-js", "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", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +95,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-apicenter?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts index 3e89e8040c69..f4b8f1db3e77 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiDefinition, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts index d0361c8e588f..0b729dcccc99 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts index e1c91fe356c4..6a6476554eb1 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsExportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts index 6199e54e8dfe..d2056b8bcead 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API definition. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts index d014c7e9a8d4..7cd16e0a6bc2 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API definition exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts index fc567ffa33be..fc804bb79909 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsImportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiSpecImportRequest, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Imports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts index e8066da018ba..fe0a7bad26cd 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiDefinitionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API definitions. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts index 9c84e4291442..f813db74f40c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiVersion, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API version. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts index 9412384352fa..ffe84896554d 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API version diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts index 5694f6db9eb0..6bd7ab01b255 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API version. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts index 7538acd58b40..1daa4195ec03 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API version exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts index c393477562d7..fc32ebc757e7 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apiVersionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API versions. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts index 1f5c19d9a29e..f2c5d69c19da 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Api, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts index ee22556ff44f..5ce9d73bbbb9 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts index 5c2db2b4fad1..21d4217b4fde 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts index 7f549409f3a0..899fe046e057 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts index 31a190f9cdd3..865cb108e7c3 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/apisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of APIs. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts index d83e7ab6b6af..482742c3cdd2 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Deployment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts index 2572624f23c5..48eb8fbdd58a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts index 575fecbc86bc..1566840f8f93 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts index 1f6699897e4c..f653b974ac3b 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API deployment exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts index d6ae6fe864be..c3a23c1d8be8 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API deployments. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts index b4f4b0f06a9f..2753948bbe36 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Environment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts index a27a1c0287fc..158fbc2e3d8c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts index 5f6bab887bb5..b85682427673 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the environment. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts index 2ba2b773a739..c247eba70681 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified environment exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts index fc12b27787e4..c71cbb28e649 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/environmentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of environments. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts index 18e2feb922d3..f20345d1664e 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { MetadataSchema, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts index 58d4d5ea5e58..ef8e4bec2438 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts index 65e6b6b16b31..03a19d26bd13 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts index d9a81348f9bd..153765d5782e 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified metadata schema exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts index 82e0a19a0b16..39773473c257 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/metadataSchemasListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of metadata schemas. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts index 5f803fc8cf69..be6dc856cc4d 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the operations for the provider diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts index 6beb806c4132..1021e5963648 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Service, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts index fd0e9db80952..bc03c349f0c4 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts index 83a925c0b89b..d2728a33a41a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesExportMetadataSchemaSample.ts @@ -13,9 +13,7 @@ import { AzureAPICenter, } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the effective metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts index 10a1d59c0657..0a752a3d6e22 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts index d451367d5583..09e7ae897f5c 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of services within the resource group. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts index 362997b90367..7e9c4170093a 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists services within an Azure subscription. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts index 6b5cb7cd6ec9..162cf97d87d9 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/servicesUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ServiceUpdate, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates existing service. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts index 29d05183737e..6531e717a0bf 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Workspace, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts index 24299d53e653..947d7e136b07 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts index f805ce803bee..59cc48e2ac42 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the workspace. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts index 93fd47657be5..b0b5b1c19e4b 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified workspace exists. diff --git a/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts b/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts index 5246d1e6cea9..c2b074210c57 100644 --- a/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples-dev/workspacesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of workspaces. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts index 3e89e8040c69..f4b8f1db3e77 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiDefinition, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts index d0361c8e588f..0b729dcccc99 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts index e1c91fe356c4..6a6476554eb1 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsExportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts index 6199e54e8dfe..d2056b8bcead 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API definition. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts index d014c7e9a8d4..7cd16e0a6bc2 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API definition exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts index fc567ffa33be..fc804bb79909 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsImportSpecificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiSpecImportRequest, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Imports the API specification. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts index e8066da018ba..fe0a7bad26cd 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiDefinitionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API definitions. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts index 9c84e4291442..f813db74f40c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiVersion, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API version. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts index 9412384352fa..ffe84896554d 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API version diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts index 5694f6db9eb0..6bd7ab01b255 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API version. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts index 7538acd58b40..1daa4195ec03 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API version exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts index c393477562d7..fc32ebc757e7 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apiVersionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API versions. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts index 1f5c19d9a29e..f2c5d69c19da 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Api, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts index ee22556ff44f..5ce9d73bbbb9 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts index 5c2db2b4fad1..21d4217b4fde 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts index 7f549409f3a0..899fe046e057 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts index 31a190f9cdd3..865cb108e7c3 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/apisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of APIs. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts index d83e7ab6b6af..482742c3cdd2 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Deployment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts index 2572624f23c5..48eb8fbdd58a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts index 575fecbc86bc..1566840f8f93 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the API deployment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts index 1f6699897e4c..f653b974ac3b 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified API deployment exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts index d6ae6fe864be..c3a23c1d8be8 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of API deployments. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts index b4f4b0f06a9f..2753948bbe36 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Environment, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts index a27a1c0287fc..158fbc2e3d8c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts index 5f6bab887bb5..b85682427673 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the environment. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts index 2ba2b773a739..c247eba70681 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified environment exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts index fc12b27787e4..c71cbb28e649 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/environmentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of environments. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts index 18e2feb922d3..f20345d1664e 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { MetadataSchema, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts index 58d4d5ea5e58..ef8e4bec2438 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts index 65e6b6b16b31..03a19d26bd13 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts index d9a81348f9bd..153765d5782e 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified metadata schema exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts index 82e0a19a0b16..39773473c257 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/metadataSchemasListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of metadata schemas. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts index 5f803fc8cf69..be6dc856cc4d 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the operations for the provider diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts index 6beb806c4132..1021e5963648 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Service, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing API. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts index fd0e9db80952..bc03c349f0c4 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts index 83a925c0b89b..d2728a33a41a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesExportMetadataSchemaSample.ts @@ -13,9 +13,7 @@ import { AzureAPICenter, } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Exports the effective metadata schema. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts index 10a1d59c0657..0a752a3d6e22 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts index d451367d5583..09e7ae897f5c 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of services within the resource group. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts index 362997b90367..7e9c4170093a 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists services within an Azure subscription. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts index 6b5cb7cd6ec9..162cf97d87d9 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/servicesUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ServiceUpdate, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates existing service. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts index 29d05183737e..6531e717a0bf 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Workspace, AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts index 24299d53e653..947d7e136b07 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specified workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts index f805ce803bee..59cc48e2ac42 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns details of the workspace. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts index 93fd47657be5..b0b5b1c19e4b 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesHeadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if specified workspace exists. diff --git a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts index 5246d1e6cea9..c2b074210c57 100644 --- a/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts +++ b/sdk/apicenter/arm-apicenter/samples/v1/typescript/src/workspacesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { AzureAPICenter } from "@azure/arm-apicenter"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a collection of workspaces. diff --git a/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts b/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts index 31380fdbb025..e5afaf2febd8 100644 --- a/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts +++ b/sdk/apicenter/arm-apicenter/src/azureAPICenter.ts @@ -24,7 +24,7 @@ import { ApiVersionsImpl, ApiDefinitionsImpl, EnvironmentsImpl, -} from "./operations"; +} from "./operations/index.js"; import { Operations, Services, @@ -35,8 +35,8 @@ import { ApiVersions, ApiDefinitions, Environments, -} from "./operationsInterfaces"; -import { AzureAPICenterOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { AzureAPICenterOptionalParams } from "./models/index.js"; export class AzureAPICenter extends coreClient.ServiceClient { $host: string; diff --git a/sdk/apicenter/arm-apicenter/src/index.ts b/sdk/apicenter/arm-apicenter/src/index.ts index ca750c4b6fb8..1c5421b6e2c7 100644 --- a/sdk/apicenter/arm-apicenter/src/index.ts +++ b/sdk/apicenter/arm-apicenter/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AzureAPICenter } from "./azureAPICenter"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { AzureAPICenter } from "./azureAPICenter.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/apicenter/arm-apicenter/src/models/parameters.ts b/sdk/apicenter/arm-apicenter/src/models/parameters.ts index c5247cbf1ceb..7af92ace7c2b 100644 --- a/sdk/apicenter/arm-apicenter/src/models/parameters.ts +++ b/sdk/apicenter/arm-apicenter/src/models/parameters.ts @@ -23,7 +23,7 @@ import { ApiDefinition as ApiDefinitionMapper, ApiSpecImportRequest as ApiSpecImportRequestMapper, Environment as EnvironmentMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts b/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts index c8fa6d6f226c..a625f038d8cd 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apiDefinitions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiDefinitions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ApiDefinitions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ApiDefinition, ApiDefinitionsListNextOptionalParams, @@ -36,7 +36,7 @@ import { ApiSpecImportRequest, ApiDefinitionsImportSpecificationOptionalParams, ApiDefinitionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ApiDefinitions operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts b/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts index 9fa03e395cf6..0afe0f4fae48 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apiVersions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ApiVersions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ApiVersions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { ApiVersion, ApiVersionsListNextOptionalParams, @@ -26,7 +26,7 @@ import { ApiVersionsHeadOptionalParams, ApiVersionsHeadResponse, ApiVersionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ApiVersions operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/apis.ts b/sdk/apicenter/arm-apicenter/src/operations/apis.ts index 05b709da7673..0e3eb1849358 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/apis.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/apis.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Apis } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Apis } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Api, ApisListNextOptionalParams, @@ -26,7 +26,7 @@ import { ApisHeadOptionalParams, ApisHeadResponse, ApisListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Apis operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/deployments.ts b/sdk/apicenter/arm-apicenter/src/operations/deployments.ts index e404f5acef63..d563f42e5837 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/deployments.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/deployments.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Deployments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Deployments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Deployment, DeploymentsListNextOptionalParams, @@ -26,7 +26,7 @@ import { DeploymentsHeadOptionalParams, DeploymentsHeadResponse, DeploymentsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Deployments operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/environments.ts b/sdk/apicenter/arm-apicenter/src/operations/environments.ts index 1937d82a3119..590dcd6bde3b 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/environments.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/environments.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Environments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Environments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Environment, EnvironmentsListNextOptionalParams, @@ -26,7 +26,7 @@ import { EnvironmentsHeadOptionalParams, EnvironmentsHeadResponse, EnvironmentsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Environments operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/index.ts b/sdk/apicenter/arm-apicenter/src/operations/index.ts index d3ec5b9576fd..b3f11a7a6334 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/index.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/index.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./services"; -export * from "./metadataSchemas"; -export * from "./workspaces"; -export * from "./apis"; -export * from "./deployments"; -export * from "./apiVersions"; -export * from "./apiDefinitions"; -export * from "./environments"; +export * from "./operations.js"; +export * from "./services.js"; +export * from "./metadataSchemas.js"; +export * from "./workspaces.js"; +export * from "./apis.js"; +export * from "./deployments.js"; +export * from "./apiVersions.js"; +export * from "./apiDefinitions.js"; +export * from "./environments.js"; diff --git a/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts b/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts index abc38c9e8b5c..e34352aa0c5e 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/metadataSchemas.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { MetadataSchemas } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { MetadataSchemas } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { MetadataSchema, MetadataSchemasListNextOptionalParams, @@ -26,7 +26,7 @@ import { MetadataSchemasHeadOptionalParams, MetadataSchemasHeadResponse, MetadataSchemasListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing MetadataSchemas operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/operations.ts b/sdk/apicenter/arm-apicenter/src/operations/operations.ts index 4801fd38a4c9..182dd81b11de 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/operations.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/services.ts b/sdk/apicenter/arm-apicenter/src/operations/services.ts index 986ca1d1b638..09ffbeac31a6 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/services.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/services.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Services } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Services } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Service, ServicesListBySubscriptionNextOptionalParams, @@ -40,7 +40,7 @@ import { ServicesExportMetadataSchemaResponse, ServicesListBySubscriptionNextResponse, ServicesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Services operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts b/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts index d4c0a2158345..63d790849654 100644 --- a/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts +++ b/sdk/apicenter/arm-apicenter/src/operations/workspaces.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Workspaces } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Workspaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureAPICenter } from "../azureAPICenter"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AzureAPICenter } from "../azureAPICenter.js"; import { Workspace, WorkspacesListNextOptionalParams, @@ -26,7 +26,7 @@ import { WorkspacesHeadOptionalParams, WorkspacesHeadResponse, WorkspacesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Workspaces operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts index da016ff84dd6..4a83a469a40d 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiDefinitions.ts @@ -22,7 +22,7 @@ import { ApiDefinitionsExportSpecificationResponse, ApiSpecImportRequest, ApiDefinitionsImportSpecificationOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ApiDefinitions. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts index 856749554457..1351572b0f5b 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apiVersions.ts @@ -17,7 +17,7 @@ import { ApiVersionsDeleteOptionalParams, ApiVersionsHeadOptionalParams, ApiVersionsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ApiVersions. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts index 8c4a30bf1d0b..e886211f3bf8 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/apis.ts @@ -17,7 +17,7 @@ import { ApisDeleteOptionalParams, ApisHeadOptionalParams, ApisHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Apis. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts index f12fe072e83d..bf1824e88b61 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/deployments.ts @@ -17,7 +17,7 @@ import { DeploymentsDeleteOptionalParams, DeploymentsHeadOptionalParams, DeploymentsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Deployments. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts index b9529ae8d1da..acb6c364fd53 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/environments.ts @@ -17,7 +17,7 @@ import { EnvironmentsDeleteOptionalParams, EnvironmentsHeadOptionalParams, EnvironmentsHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Environments. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts index d3ec5b9576fd..b3f11a7a6334 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/index.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./services"; -export * from "./metadataSchemas"; -export * from "./workspaces"; -export * from "./apis"; -export * from "./deployments"; -export * from "./apiVersions"; -export * from "./apiDefinitions"; -export * from "./environments"; +export * from "./operations.js"; +export * from "./services.js"; +export * from "./metadataSchemas.js"; +export * from "./workspaces.js"; +export * from "./apis.js"; +export * from "./deployments.js"; +export * from "./apiVersions.js"; +export * from "./apiDefinitions.js"; +export * from "./environments.js"; diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts index 747d25df8ea0..9dde55f8a445 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/metadataSchemas.ts @@ -17,7 +17,7 @@ import { MetadataSchemasDeleteOptionalParams, MetadataSchemasHeadOptionalParams, MetadataSchemasHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a MetadataSchemas. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts index 251f5f582e64..2c280c7eb723 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts index dd3836d522c8..b939a18861b2 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/services.ts @@ -23,7 +23,7 @@ import { MetadataSchemaExportRequest, ServicesExportMetadataSchemaOptionalParams, ServicesExportMetadataSchemaResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Services. */ diff --git a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts index d6407dce0ed1..c95bc51dbfe0 100644 --- a/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts +++ b/sdk/apicenter/arm-apicenter/src/operationsInterfaces/workspaces.ts @@ -17,7 +17,7 @@ import { WorkspacesDeleteOptionalParams, WorkspacesHeadOptionalParams, WorkspacesHeadResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Workspaces. */ diff --git a/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts b/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts index 793b026b43a8..762833bf1d61 100644 --- a/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts +++ b/sdk/apicenter/arm-apicenter/test/apicenter_operations_test.spec.ts @@ -6,23 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; +import { env, Recorder, RecorderStartOptions, isPlaybackMode } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AzureAPICenter } from "../src/azureAPICenter"; +import { AzureAPICenter } from "../src/azureAPICenter.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; 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" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { @@ -41,30 +34,25 @@ describe("AzureAPICenter test", () => { let recorder: Recorder; let subscriptionId: string; let client: AzureAPICenter; - let location: string; - let resourceGroup: string; - let resourceName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); client = new AzureAPICenter(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourceName = "testresource" }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - it("operation list test", async function () { + it("operation list test", async () => { const resArray = new Array(); for await (let item of client.operations.list()) { resArray.push(item); } + assert(resArray.length > 0); }); -}) +}); diff --git a/sdk/apicenter/arm-apicenter/tsconfig.json b/sdk/apicenter/arm-apicenter/tsconfig.json index eb48a45d313a..19ceb382b521 100644 --- a/sdk/apicenter/arm-apicenter/tsconfig.json +++ b/sdk/apicenter/arm-apicenter/tsconfig.json @@ -1,33 +1,13 @@ { - "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, - "paths": { - "@azure/arm-apicenter": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.samples.json b/sdk/apicenter/arm-apicenter/tsconfig.samples.json new file mode 100644 index 000000000000..f2ed1c498167 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-apicenter": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.src.json b/sdk/apicenter/arm-apicenter/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/apicenter/arm-apicenter/tsconfig.test.json b/sdk/apicenter/arm-apicenter/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/apicenter/arm-apicenter/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/apicenter/arm-apicenter/vitest.config.ts b/sdk/apicenter/arm-apicenter/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/apicenter/arm-apicenter/vitest.esm.config.ts b/sdk/apicenter/arm-apicenter/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/apicenter/arm-apicenter/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/apimanagement/arm-apimanagement/api-extractor.json b/sdk/apimanagement/arm-apimanagement/api-extractor.json index 467fe61534d0..8e3b67d9e17e 100644 --- a/sdk/apimanagement/arm-apimanagement/api-extractor.json +++ b/sdk/apimanagement/arm-apimanagement/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-apimanagement.d.ts" + "publicTrimmedFilePath": "dist/arm-apimanagement.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index 4f1cc02ebab2..77f0e7d86123 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -8,12 +8,12 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.12.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-lro": "^2.7.2", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.0", "tslib": "^2.2.0" }, "keywords": [ @@ -21,52 +21,38 @@ "azure", "typescript", "browser", - "isomorphic" + "isomorphic", + "cloud" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-apimanagement.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, + "repository": "github:Azure/azure-sdk-for-js", "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", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +64,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +74,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +95,31 @@ ], "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview" + }, + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "selfLink": false + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts index c925ab438886..ecc4eb4dabc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiCreateOrUpdateParameter, - ApiManagementClient + ApiCreateOrUpdateParameter, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json */ async function apiManagementCreateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" - } - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + } + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -62,32 +60,32 @@ async function apiManagementCreateApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json */ async function apiManagementCreateApiClone() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api2"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -97,36 +95,36 @@ async function apiManagementCreateApiClone() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json */ async function apiManagementCreateApiNewVersionUsingExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echoapiv3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -136,28 +134,28 @@ async function apiManagementCreateApiNewVersionUsingExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json */ async function apiManagementCreateApiRevisionFromExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -167,27 +165,27 @@ async function apiManagementCreateApiRevisionFromExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json */ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "apidocs"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -197,27 +195,27 @@ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json */ async function apiManagementCreateApiUsingOai3Import() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -227,28 +225,28 @@ async function apiManagementCreateApiUsingOai3Import() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json */ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -258,26 +256,26 @@ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryPa * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json */ async function apiManagementCreateApiUsingSwaggerImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -287,27 +285,27 @@ async function apiManagementCreateApiUsingSwaggerImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json */ async function apiManagementCreateApiUsingWadlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -317,41 +315,41 @@ async function apiManagementCreateApiUsingWadlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json */ async function apiManagementCreateApiWithMultipleAuthServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + }, + { + authorizationServerId: "authorizationServerId2284", + scope: "oauth2scope2581" + } + ] }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -361,41 +359,41 @@ async function apiManagementCreateApiWithMultipleAuthServers() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json */ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283" + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284" + } + ] }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -405,39 +403,39 @@ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json */ async function apiManagementCreateApiWithOpenIdConnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid" - } - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid" + } + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -447,29 +445,29 @@ async function apiManagementCreateApiWithOpenIdConnect() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json */ async function apiManagementCreateGraphQlApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -479,31 +477,31 @@ async function apiManagementCreateGraphQlApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json */ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -513,30 +511,30 @@ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json */ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -546,48 +544,48 @@ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json */ async function apiManagementCreateWebSocketApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApi(); - apiManagementCreateApiClone(); - apiManagementCreateApiNewVersionUsingExistingApi(); - apiManagementCreateApiRevisionFromExistingApi(); - apiManagementCreateApiUsingImportOverrideServiceUrl(); - apiManagementCreateApiUsingOai3Import(); - apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - apiManagementCreateApiUsingSwaggerImport(); - apiManagementCreateApiUsingWadlImport(); - apiManagementCreateApiWithMultipleAuthServers(); - apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - apiManagementCreateApiWithOpenIdConnect(); - apiManagementCreateGraphQlApi(); - apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - apiManagementCreateSoapToRestApiUsingWsdlImport(); - apiManagementCreateWebSocketApi(); + apiManagementCreateApi(); + apiManagementCreateApiClone(); + apiManagementCreateApiNewVersionUsingExistingApi(); + apiManagementCreateApiRevisionFromExistingApi(); + apiManagementCreateApiUsingImportOverrideServiceUrl(); + apiManagementCreateApiUsingOai3Import(); + apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + apiManagementCreateApiUsingSwaggerImport(); + apiManagementCreateApiUsingWadlImport(); + apiManagementCreateApiWithMultipleAuthServers(); + apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + apiManagementCreateApiWithOpenIdConnect(); + apiManagementCreateGraphQlApi(); + apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + apiManagementCreateSoapToRestApiUsingWsdlImport(); + apiManagementCreateWebSocketApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts index bce9734c0807..06ddce3a973e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json */ async function apiManagementDeleteApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApi(); + apiManagementDeleteApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts index bb786b3e0770..26c439d90060 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json */ async function apiManagementCreateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiDiagnostic(); + apiManagementCreateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts index 3c10221ab17f..aa8a5f161fad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json */ async function apiManagementDeleteApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.delete( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiDiagnostic(); + apiManagementDeleteApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts index fee3ff7ccecc..bf58d09ae1c5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json */ async function apiManagementHeadApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.getEntityTag( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadApiDiagnostic(); + apiManagementHeadApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts index b7c47ea2ae7a..958454537dbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json */ async function apiManagementGetApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetApiDiagnostic(); + apiManagementGetApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts index 1e3cf1eb81f3..4ea53d829c79 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json */ async function apiManagementListApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiDiagnostic.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiDiagnostics(); + apiManagementListApiDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts index 98db9f1389bd..29c842a7dc5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. @@ -24,42 +22,42 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json */ async function apiManagementUpdateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiDiagnostic(); + apiManagementUpdateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts index 0bc983750541..baff554b9c6b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json */ async function apiManagementGetApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const format = "swagger-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } /** @@ -48,29 +46,29 @@ async function apiManagementGetApiExportInOpenApi2Dot0() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json */ async function apiManagementGetApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "aid9676"; + const format = "openapi-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } async function main() { - apiManagementGetApiExportInOpenApi2Dot0(); - apiManagementGetApiExportInOpenApi3Dot0(); + apiManagementGetApiExportInOpenApi2Dot0(); + apiManagementGetApiExportInOpenApi3Dot0(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts index 2b95bbce1f20..b9f0cee28c4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts index 6be69f527b3f..d07bec76b215 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json */ async function apiManagementGetApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } /** @@ -40,21 +38,21 @@ async function apiManagementGetApiContract() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json */ async function apiManagementGetApiRevisionContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } async function main() { - apiManagementGetApiContract(); - apiManagementGetApiRevisionContract(); + apiManagementGetApiContract(); + apiManagementGetApiRevisionContract(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts index cbe5617fbf06..5457d216d7f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueAttachmentContract, - ApiManagementClient + ApiManagementClient, + IssueAttachmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json */ async function apiManagementCreateApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const parameters: IssueAttachmentContract = { + content: "IEJhc2U2NA==", + contentFormat: "image/jpeg", + title: "Issue attachment." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueAttachment(); + apiManagementCreateApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts index fbfe39d80766..2a892d115020 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json */ async function apiManagementDeleteApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueAttachment(); + apiManagementDeleteApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts index 2c4e90eb568f..ae5a940bee71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json */ async function apiManagementHeadApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueAttachment(); + apiManagementHeadApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts index 0d908d111952..899219feb7c3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json */ async function apiManagementGetApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueAttachment(); + apiManagementGetApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts index ee061f31375f..ad0012d54651 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json */ async function apiManagementListApiIssueAttachments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueAttachment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueAttachments(); + apiManagementListApiIssueAttachments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts index 32936cb7b1cc..1682afae2437 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueCommentContract, - ApiManagementClient + ApiManagementClient, + IssueCommentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json */ async function apiManagementCreateApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const parameters: IssueCommentContract = { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueComment(); + apiManagementCreateApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts index 834fcd9846b3..94e1240c3e35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json */ async function apiManagementDeleteApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueComment(); + apiManagementDeleteApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts index cf361ab2bf4a..0e07c75463ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json */ async function apiManagementHeadApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueComment(); + apiManagementHeadApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts index a653c91031fc..acbc31fbb053 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json */ async function apiManagementGetApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueComment(); + apiManagementGetApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts index 0f707b25fdc6..f61d5a58bda5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json */ async function apiManagementListApiIssueComments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueComment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueComments(); + apiManagementListApiIssueComments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts index 17118262adfb..c1656d0d4144 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, IssueContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. @@ -21,35 +19,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json */ async function apiManagementCreateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const parameters: IssueContract = { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssue(); + apiManagementCreateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts index 62947660fdae..7638e5ff53b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Issue from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json */ async function apiManagementDeleteApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssue(); + apiManagementDeleteApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts index 9a4b143c4da3..21c8fba6ffdb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json */ async function apiManagementHeadApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssue(); + apiManagementHeadApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts index b806298655a6..37158457ff78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json */ async function apiManagementGetApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementGetApiIssue(); + apiManagementGetApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts index e40ae7fd2e07..65f0b8edcc6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all issues associated with the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json */ async function apiManagementListApiIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssue.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssues(); + apiManagementListApiIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts index 25a011cbee75..6665ab334d43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueUpdateContract, - ApiManagementClient + ApiManagementClient, + IssueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing issue for an API. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json */ async function apiManagementUpdateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const parameters: IssueUpdateContract = { state: "closed" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiIssue(); + apiManagementUpdateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts index e1d94d424419..76669128b1cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all APIs of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts index 8a067b4d7eff..e850100bb822 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of apis associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json */ async function apiManagementListApisByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApisByTags(); + apiManagementListApisByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts index 75c47d43d0ff..59541db1b3e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. @@ -21,17 +19,17 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOperations.json */ async function apiManagementListOperations() { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (let item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (let item of client.apiManagementOperations.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOperations(); + apiManagementListOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts index dfd4316b30c0..b56e46ebb737 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json */ async function apiManagementApplyNetworkConfigurationUpdates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us" - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { - parameters - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { + location: "west us" + }; + const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + parameters + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementApplyNetworkConfigurationUpdates(); + apiManagementApplyNetworkConfigurationUpdates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts index b03c356fdfc1..80209b4270df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json */ async function apiManagementBackupWithAccessKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -53,25 +51,25 @@ async function apiManagementBackupWithAccessKey() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json */ async function apiManagementBackupWithSystemManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -81,32 +79,32 @@ async function apiManagementBackupWithSystemManagedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json */ async function apiManagementBackupWithUserAssignedManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementBackupWithAccessKey(); - apiManagementBackupWithSystemManagedIdentity(); - apiManagementBackupWithUserAssignedManagedIdentity(); + apiManagementBackupWithAccessKey(); + apiManagementBackupWithSystemManagedIdentity(); + apiManagementBackupWithUserAssignedManagedIdentity(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts index 1a25f9a44a64..3b03fe23aa8f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceCheckNameAvailabilityParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. @@ -24,21 +22,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json */ async function apiManagementServiceCheckNameAvailability() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.checkNameAvailability( - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { + name: "apimService1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability( + parameters + ); + console.log(result); } async function main() { - apiManagementServiceCheckNameAvailability(); + apiManagementServiceCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts index 5f7ab735d7d9..1542c0c35733 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceResource, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceResource } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -24,56 +22,56 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json */ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 } - } - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net" - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net" - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net" - } - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + additionalLocations: [ + { + disableGateway: true, + location: "East US", + sku: { name: "Premium", capacity: 1 } + } + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net" + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net" + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net" + } + ], + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -83,26 +81,26 @@ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json */ async function apiManagementCreateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { name: "Contoso", test: "User" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -112,27 +110,27 @@ async function apiManagementCreateService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json */ async function apiManagementCreateServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -142,34 +140,34 @@ async function apiManagementCreateServiceHavingMsi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json */ async function apiManagementCreateServiceInVnetWithPublicIP() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" - }, - virtualNetworkType: "External", - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + virtualNetworkType: "External", + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -179,27 +177,27 @@ async function apiManagementCreateServiceInVnetWithPublicIP() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json */ async function apiManagementCreateServiceInZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -209,58 +207,58 @@ async function apiManagementCreateServiceInZones() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json */ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - } - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} - } - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} + } + }, + location: "North Europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -270,27 +268,27 @@ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json */ async function apiManagementCreateServiceWithNatGatewayEnabled() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -300,34 +298,34 @@ async function apiManagementCreateServiceWithNatGatewayEnabled() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json */ async function apiManagementCreateServiceWithSystemCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority" - } - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: + "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority" + } + ], + location: "Central US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -337,32 +335,32 @@ async function apiManagementCreateServiceWithSystemCertificates() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json */ async function apiManagementCreateServiceWithUserAssignedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} - } - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -372,39 +370,39 @@ async function apiManagementCreateServiceWithUserAssignedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json */ async function apiManagementUndelete() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateMultiRegionServiceWithCustomHostname(); - apiManagementCreateService(); - apiManagementCreateServiceHavingMsi(); - apiManagementCreateServiceInVnetWithPublicIP(); - apiManagementCreateServiceInZones(); - apiManagementCreateServiceWithCustomHostnameKeyVault(); - apiManagementCreateServiceWithNatGatewayEnabled(); - apiManagementCreateServiceWithSystemCertificates(); - apiManagementCreateServiceWithUserAssignedIdentity(); - apiManagementUndelete(); + apiManagementCreateMultiRegionServiceWithCustomHostname(); + apiManagementCreateService(); + apiManagementCreateServiceHavingMsi(); + apiManagementCreateServiceInVnetWithPublicIP(); + apiManagementCreateServiceInZones(); + apiManagementCreateServiceWithCustomHostnameKeyVault(); + apiManagementCreateServiceWithNatGatewayEnabled(); + apiManagementCreateServiceWithSystemCertificates(); + apiManagementCreateServiceWithUserAssignedIdentity(); + apiManagementUndelete(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts index dfd1f991b2c0..e8c94d35e97d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing API Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json */ async function apiManagementServiceDeleteService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginDeleteAndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceDeleteService(); + apiManagementServiceDeleteService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts index 8397ca8c3e72..f0f8d220e5d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json */ async function apiManagementServiceGetDomainOwnershipIdentifier() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); } async function main() { - apiManagementServiceGetDomainOwnershipIdentifier(); + apiManagementServiceGetDomainOwnershipIdentifier(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts index 7163797c6d8d..2441ddb4d138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets an API Management service resource description. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json */ async function apiManagementServiceGetMultiRegionInternalVnet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -42,18 +40,18 @@ async function apiManagementServiceGetMultiRegionInternalVnet() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json */ async function apiManagementServiceGetService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -63,24 +61,24 @@ async function apiManagementServiceGetService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json */ async function apiManagementServiceGetServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetMultiRegionInternalVnet(); - apiManagementServiceGetService(); - apiManagementServiceGetServiceHavingMsi(); + apiManagementServiceGetMultiRegionInternalVnet(); + apiManagementServiceGetService(); + apiManagementServiceGetServiceHavingMsi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts index 5b7a9b85fd34..9fcb0310a374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json */ async function apiManagementServiceGetSsoToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetSsoToken(); + apiManagementServiceGetSsoToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts index 68347b154435..d8cfdb77b689 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all API Management services within a resource group. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json */ async function apiManagementListServiceBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscriptionAndResourceGroup(); + apiManagementListServiceBySubscriptionAndResourceGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts index dae98cd98de7..b1b37bc3392a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all API Management services within an Azure subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json */ async function apiManagementListServiceBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscription(); + apiManagementListServiceBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts index 12b4f998926b..ade1818aa1f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json */ async function apiManagementMigrateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginMigrateToStv2AndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementMigrateService(); + apiManagementMigrateService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts index d74b73856aad..192343606f8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json */ async function apiManagementRestoreService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginRestoreAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementRestoreService(); + apiManagementRestoreService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts index 7e0ad8f9d06f..d50bfe252c7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all available SKU for a given API Management service @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json */ async function apiManagementListSkUsConsumption() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -45,26 +43,26 @@ async function apiManagementListSkUsConsumption() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json */ async function apiManagementListSkUsDedicated() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSkUsConsumption(); - apiManagementListSkUsDedicated(); + apiManagementListSkUsConsumption(); + apiManagementListSkUsDedicated(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts index ea2ec6b8aad9..42ca5995a30d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing API Management service. @@ -24,24 +22,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json */ async function apiManagementUpdateServiceDisableTls10() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + customProperties: { + microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -51,23 +49,23 @@ async function apiManagementUpdateServiceDisableTls10() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json */ async function apiManagementUpdateServicePublisherDetails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -77,49 +75,49 @@ async function apiManagementUpdateServicePublisherDetails() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json */ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - additionalLocations: [ - { - location: "Australia East", + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + zones: ["1", "2", "3"] + } + ], publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", sku: { name: "Premium", capacity: 3 }, virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" }, + virtualNetworkType: "External", zones: ["1", "2", "3"] - } - ], - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateServiceDisableTls10(); - apiManagementUpdateServicePublisherDetails(); - apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); + apiManagementUpdateServiceDisableTls10(); + apiManagementUpdateServicePublisherDetails(); + apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts index 7e31e185e783..f6760b07e8c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json */ async function listsAllAvailableResourceSkUs() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementSkus.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - listsAllAvailableResourceSkUs(); + listsAllAvailableResourceSkUs(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts index 57ddd217eb6b..e91d9872911e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationContract, - ApiManagementClient + ApiManagementClient, + OperationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new operation in the API or updates an existing one. @@ -24,57 +22,57 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json */ async function apiManagementCreateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User" - } - ] - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" } - ], - statusCode: 200 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "PetStoreTemplate2"; + const operationId = "newoperations"; + const parameters: OperationContract = { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User" + } + ] + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" } + ], + statusCode: 200 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiOperation(); + apiManagementCreateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts index d414082a183c..92fe8fc6b30c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified operation in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json */ async function apiManagementDeleteApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperation(); + apiManagementDeleteApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts index 3cebed551155..05c267acae11 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json */ async function apiManagementHeadApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperation(); + apiManagementHeadApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts index 10b16a1eceeb..c8cef3845950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json */ async function apiManagementGetApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } /** @@ -46,27 +44,27 @@ async function apiManagementGetApiOperation() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json */ async function apiManagementGetApiOperationPetStore() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "swagger-petstore"; + const operationId = "loginUser"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementGetApiOperation(); - apiManagementGetApiOperationPetStore(); + apiManagementGetApiOperation(); + apiManagementGetApiOperationPetStore(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts index 67fec5856be7..acfbebdfc843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the operations for the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json */ async function apiManagementListApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiOperation.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperations(); + apiManagementListApiOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts index 97461f9f8ac8..6cd9f3b7f173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiOperationPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. @@ -25,37 +23,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json */ async function apiManagementCreateApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const operationId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationPolicy(); + apiManagementCreateApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts index 4478ff0fa99a..c810922ed199 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api Operation. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json */ async function apiManagementDeleteApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const operationId = "testoperation"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationPolicy(); + apiManagementDeleteApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts index 5bc3e6ddd58e..8fde1fa291df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json */ async function apiManagementHeadApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationPolicy(); + apiManagementHeadApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts index cab61e48b966..d7b2c3bbcc12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API Operation level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json */ async function apiManagementGetApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationPolicy(); + apiManagementGetApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts index aa843602a285..17f947b56216 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the API Operation level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json */ async function apiManagementListApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const operationId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementListApiOperationPolicies(); + apiManagementListApiOperationPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts index 0f79451fcfb9..beb38dd57c47 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationUpdateContract, - ApiManagementClient + ApiManagementClient, + OperationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. @@ -24,62 +22,62 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json */ async function apiManagementUpdateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"] - } - ] - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200 - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const operationId = "operationId"; + const ifMatch = "*"; + const parameters: OperationUpdateContract = { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: + 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"] + } + ] + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200 + }, + { + description: "Server Error.", + headers: [], + representations: [], + statusCode: 500 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiOperation(); + apiManagementUpdateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts index fa605ca9b679..04aecfe419bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API. @@ -25,31 +23,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json */ async function apiManagementCreateApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } /** @@ -59,36 +57,36 @@ async function apiManagementCreateApiPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json */ async function apiManagementCreateApiPolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiPolicy(); - apiManagementCreateApiPolicyNonXmlEncoded(); + apiManagementCreateApiPolicy(); + apiManagementCreateApiPolicyNonXmlEncoded(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts index d129e7c63897..b8fc907fc1e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json */ async function apiManagementDeleteApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "loggerId"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.delete( + resourceGroupName, + serviceName, + apiId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiPolicy(); + apiManagementDeleteApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts index 65d78626c8c0..1cb14c5148db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json */ async function apiManagementHeadApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiPolicy(); + apiManagementHeadApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts index 144ec3c40c84..a0607e87cb7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json */ async function apiManagementGetApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiPolicy(); + apiManagementGetApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts index 288412e2c710..7b478adfc0e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json */ async function apiManagementListApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementListApiPolicies(); + apiManagementListApiPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts index d318b1473b02..0070ec9cab90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Products, which the API is part of. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json */ async function apiManagementListApiProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiProduct.listByApis( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiProducts(); + apiManagementListApiProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts index cb79c7d8ac65..73d39ee9612c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Release for the API. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json */ async function apiManagementCreateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiRelease(); + apiManagementCreateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts index 5632e6d7ca5f..c336777b384b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified release in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json */ async function apiManagementDeleteApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5a5fcc09124a7fa9b89f2f1d"; + const releaseId = "testrev"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.delete( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiRelease(); + apiManagementDeleteApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts index 22a8e6432079..a82d98e30885 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the etag of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json */ async function apiManagementHeadApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.getEntityTag( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementHeadApiRelease(); + apiManagementHeadApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts index 910b9cc7aa94..fd9b137f6bd4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the details of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json */ async function apiManagementGetApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementGetApiRelease(); + apiManagementGetApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts index 8d7992118402..64127e944b8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json */ async function apiManagementListApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRelease.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiReleases(); + apiManagementListApiReleases(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts index 36d6b1ea7b60..2ce58ccc3844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json */ async function apiManagementUpdateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const ifMatch = "*"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiRelease(); + apiManagementUpdateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts index 369b6861fae5..576b24fb92ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all revisions of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json */ async function apiManagementListApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRevision.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiRevisions(); + apiManagementListApiRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts index e83665edc36a..41be2f7461da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, SchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates schema configuration for the API. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json */ async function apiManagementCreateApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const parameters: SchemaContract = { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiSchema(); + apiManagementCreateApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts index e3295239b6d1..713facf24838 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the schema configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json */ async function apiManagementDeleteApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const schemaId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.delete( + resourceGroupName, + serviceName, + apiId, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiSchema(); + apiManagementDeleteApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts index 152d4181d025..2aedc068386e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json */ async function apiManagementHeadApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.getEntityTag( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApiSchema(); + apiManagementHeadApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts index 0c9e2208fe4e..40781462ab34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json */ async function apiManagementGetApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetApiSchema(); + apiManagementGetApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts index b82721c480f1..5b592fd0ac0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json */ async function apiManagementListApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiSchema.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiSchemas(); + apiManagementListApiSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts index a47471031228..a684f521a1fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagDescriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + TagDescriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Update tag description in scope of the Api. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json */ async function apiManagementCreateApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagDescriptionId = "tagId1"; + const parameters: TagDescriptionCreateParameters = { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiTagDescription(); + apiManagementCreateApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts index bb648aafb5be..c89fd8aa72e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete tag description for the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json */ async function apiManagementDeleteApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagDescriptionId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.delete( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiTagDescription(); + apiManagementDeleteApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts index da9fc62a5c2a..0507a111064c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json */ async function apiManagementHeadApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.getEntityTag( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementHeadApiTagDescription(); + apiManagementHeadApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts index afe59cf901ea..f65ddc6b08a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Tag description in scope of API @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json */ async function apiManagementGetApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementGetApiTagDescription(); + apiManagementGetApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts index 87dc8f957b82..fe39c620a5c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json */ async function apiManagementListApiTagDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiTagDescription.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTagDescriptions(); + apiManagementListApiTagDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts index 452f2a8c93fc..c1bd6c38b496 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiUpdateContract, - ApiManagementClient + ApiManagementClient, + ApiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified API of the API Management service instance. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json */ async function apiManagementUpdateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const parameters: ApiUpdateContract = { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApi(); + apiManagementUpdateApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts index e99607ed0708..cdf359c7a089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetContract, - ApiManagementClient + ApiManagementClient, + ApiVersionSetContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a Api Version Set. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json */ async function apiManagementCreateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "api1"; + const parameters: ApiVersionSetContract = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate( + resourceGroupName, + serviceName, + versionSetId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiVersionSet(); + apiManagementCreateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts index 1b5131200550..2536236caf34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Api Version Set. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json */ async function apiManagementDeleteApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "a1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.delete( + resourceGroupName, + serviceName, + versionSetId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiVersionSet(); + apiManagementDeleteApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts index a13138798b8a..d9293aa44755 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json */ async function apiManagementHeadApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.getEntityTag( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementHeadApiVersionSet(); + apiManagementHeadApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts index 3c18cf6498b8..2a4661ef56bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json */ async function apiManagementGetApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementGetApiVersionSet(); + apiManagementGetApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts index e69cc77fbc18..1be2c7635edc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json */ async function apiManagementListApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiVersionSet.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiVersionSets(); + apiManagementListApiVersionSets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts index f24581aaafc9..5e435142f803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiVersionSetUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json */ async function apiManagementUpdateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const ifMatch = "*"; + const parameters: ApiVersionSetUpdateParameters = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update( + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiVersionSet(); + apiManagementUpdateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts index ff3225655428..d388065c605f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json */ async function apiManagementCreateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiWiki(); + apiManagementCreateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts index 6264ade4faf7..2f9eb975013e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json */ async function apiManagementDeleteApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiWiki(); + apiManagementDeleteApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts index 0357a5166461..7cadca565ddf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json */ async function apiManagementHeadApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApiWiki(); + apiManagementHeadApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts index 359249679756..e1ebfee205c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts index 0e9975b5e0ed..6a334372a2ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json */ async function apiManagementUpdateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiWiki(); + apiManagementUpdateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts index 8fabc4f2fdfc..103a943a3408 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the wikis for an API specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiWikis.json */ async function apiManagementListApiWikis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiWikis.list( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiWikis(); + apiManagementListApiWikis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts index bbad6c195ebc..6ca83513025b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationAccessPolicyContract, - ApiManagementClient + ApiManagementClient, + AuthorizationAccessPolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates Authorization Access Policy. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json */ async function apiManagementCreateAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const parameters: AuthorizationAccessPolicyContract = { + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAccessPolicy(); + apiManagementCreateAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts index 96e976d1186f..5c6a74192fe1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific access policy from the Authorization. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json */ async function apiManagementDeleteAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationAccessPolicy(); + apiManagementDeleteAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts index fe3c3e9890dd..907ba43ff887 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json */ async function apiManagementGetAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationAccessPolicy(); + apiManagementGetAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts index c09bd1ad1709..e093bea742ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json */ async function apiManagementListAuthorizationAccessPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationAccessPolicy.listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationAccessPolicies(); + apiManagementListAuthorizationAccessPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts index 547d469315fa..02e3c9430ee1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationConfirmConsentCodeRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json */ async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationConfirmConsentCodeRequestContract = { + consentCode: "theconsentcode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.confirmConsentCode( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementPostAuthorizationConfirmConsentCodeRequest(); + apiManagementPostAuthorizationConfirmConsentCodeRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts index 1a82f36465af..a60e56983ca4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationContract, - ApiManagementClient + ApiManagementClient, + AuthorizationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json */ async function apiManagementCreateAuthorizationAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz2"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } /** @@ -54,36 +52,36 @@ async function apiManagementCreateAuthorizationAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json */ async function apiManagementCreateAuthorizationAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "", - clientSecret: "" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const authorizationId = "authz1"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { + clientId: "", + clientSecret: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAadAuthCode(); - apiManagementCreateAuthorizationAadClientCred(); + apiManagementCreateAuthorizationAadAuthCode(); + apiManagementCreateAuthorizationAadClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts index f049fbee5467..6fa94c732ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json */ async function apiManagementDeleteAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorization(); + apiManagementDeleteAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts index be32aa09673c..378f747c27e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json */ async function apiManagementGetAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + ); + console.log(result); } async function main() { - apiManagementGetAuthorization(); + apiManagementGetAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts index 18367a048a92..7856e4f84086 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsAuthCode.json */ async function apiManagementListAuthorizationsAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorization.listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -47,28 +45,28 @@ async function apiManagementListAuthorizationsAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsClientCred.json */ async function apiManagementListAuthorizationsClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorization.listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationsAuthCode(); - apiManagementListAuthorizationsClientCred(); + apiManagementListAuthorizationsAuthCode(); + apiManagementListAuthorizationsClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts index d82ee1d5c076..15f209913903 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationLoginRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationLoginRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets authorization login links. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationLoginRequest.json */ async function apiManagementGetAuthorizationLoginRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationLoginRequestContract = { - postLoginRedirectUrl: "https://www.bing.com/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationLoginLinks.post( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationLoginRequestContract = { + postLoginRedirectUrl: "https://www.bing.com/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationLoginLinks.post( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationLoginRequest(); + apiManagementGetAuthorizationLoginRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts index 82b92215f73d..ebcf96cdfbe7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationProviderContract, - ApiManagementClient + ApiManagementClient, + AuthorizationProviderContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization provider. @@ -24,37 +22,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json */ async function apiManagementCreateAuthorizationProviderAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithauthcode", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "", - clientSecret: "", - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const parameters: AuthorizationProviderContract = { + displayName: "aadwithauthcode", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "", + clientSecret: "", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -64,35 +62,35 @@ async function apiManagementCreateAuthorizationProviderAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json */ async function apiManagementCreateAuthorizationProviderAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithclientcred", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const parameters: AuthorizationProviderContract = { + displayName: "aadwithclientcred", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -102,39 +100,39 @@ async function apiManagementCreateAuthorizationProviderAadClientCred() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json */ async function apiManagementCreateAuthorizationProviderGenericOAuth2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "eventbrite"; - const parameters: AuthorizationProviderContract = { - displayName: "eventbrite", - identityProvider: "oauth2", - oauth2: { - grantTypes: { - authorizationCode: { - authorizationUrl: "https://www.eventbrite.com/oauth/authorize", - clientId: "", - clientSecret: "", - refreshUrl: "https://www.eventbrite.com/oauth/token", - scopes: "", - tokenUrl: "https://www.eventbrite.com/oauth/token" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "eventbrite"; + const parameters: AuthorizationProviderContract = { + displayName: "eventbrite", + identityProvider: "oauth2", + oauth2: { + grantTypes: { + authorizationCode: { + authorizationUrl: "https://www.eventbrite.com/oauth/authorize", + clientId: "", + clientSecret: "", + refreshUrl: "https://www.eventbrite.com/oauth/token", + scopes: "", + tokenUrl: "https://www.eventbrite.com/oauth/token" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } /** @@ -144,44 +142,44 @@ async function apiManagementCreateAuthorizationProviderGenericOAuth2() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json */ async function apiManagementCreateAuthorizationProviderOobGoogle() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "google"; - const parameters: AuthorizationProviderContract = { - displayName: "google", - identityProvider: "google", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "", - clientSecret: "", - scopes: - "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "google"; + const parameters: AuthorizationProviderContract = { + displayName: "google", + identityProvider: "google", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "", + clientSecret: "", + scopes: + "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" + } + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" } - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationProviderAadAuthCode(); - apiManagementCreateAuthorizationProviderAadClientCred(); - apiManagementCreateAuthorizationProviderGenericOAuth2(); - apiManagementCreateAuthorizationProviderOobGoogle(); + apiManagementCreateAuthorizationProviderAadAuthCode(); + apiManagementCreateAuthorizationProviderAadClientCred(); + apiManagementCreateAuthorizationProviderGenericOAuth2(); + apiManagementCreateAuthorizationProviderOobGoogle(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts index 07df09fdf5d7..89eff2c3929a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationProvider.json */ async function apiManagementDeleteAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationProvider(); + apiManagementDeleteAuthorizationProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts index 50b24da54c3c..cb16b9f99b14 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json */ async function apiManagementGetAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.get( - resourceGroupName, - serviceName, - authorizationProviderId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.get( + resourceGroupName, + serviceName, + authorizationProviderId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationProvider(); + apiManagementGetAuthorizationProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts index 8e52e14dc82e..eae039a5b2c9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationProviders.json */ async function apiManagementListAuthorizationProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationProviders(); + apiManagementListAuthorizationProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts index bbfb1a8599c5..760a3328fff0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationServerContract, - ApiManagementClient + ApiManagementClient, + AuthorizationServerContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. @@ -24,43 +22,43 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationServer.json */ async function apiManagementCreateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const parameters: AuthorizationServerContract = { - description: "test server", - authorizationEndpoint: "https://www.contoso.com/oauth2/auth", - authorizationMethods: ["GET"], - bearerTokenSendingMethods: ["authorizationHeader"], - clientId: "1", - clientRegistrationEndpoint: "https://www.contoso.com/apps", - clientSecret: "2", - defaultScope: "read write", - displayName: "test2", - grantTypes: ["authorizationCode", "implicit"], - resourceOwnerPassword: "pwd", - resourceOwnerUsername: "un", - supportState: true, - tokenEndpoint: "https://www.contoso.com/oauth2/token", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.createOrUpdate( - resourceGroupName, - serviceName, - authsid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer"; + const parameters: AuthorizationServerContract = { + description: "test server", + authorizationEndpoint: "https://www.contoso.com/oauth2/auth", + authorizationMethods: ["GET"], + bearerTokenSendingMethods: ["authorizationHeader"], + clientId: "1", + clientRegistrationEndpoint: "https://www.contoso.com/apps", + clientSecret: "2", + defaultScope: "read write", + displayName: "test2", + grantTypes: ["authorizationCode", "implicit"], + resourceOwnerPassword: "pwd", + resourceOwnerUsername: "un", + supportState: true, + tokenEndpoint: "https://www.contoso.com/oauth2/token", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.createOrUpdate( + resourceGroupName, + serviceName, + authsid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationServer(); + apiManagementCreateAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts index 3ead60ddd985..3bc6abba1f8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization server instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationServer.json */ async function apiManagementDeleteAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.delete( - resourceGroupName, - serviceName, - authsid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.delete( + resourceGroupName, + serviceName, + authsid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationServer(); + apiManagementDeleteAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts index 959f296d1087..4e9d14a9468d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadAuthorizationServer.json */ async function apiManagementHeadAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.getEntityTag( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.getEntityTag( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementHeadAuthorizationServer(); + apiManagementHeadAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts index 322be95d80db..cf2ad60b97e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json */ async function apiManagementGetAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.get( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.get( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationServer(); + apiManagementGetAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts index 56d4ccf2e5e3..0f0f6f7c9529 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationServers.json */ async function apiManagementListAuthorizationServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationServer.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationServer.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationServers(); + apiManagementListAuthorizationServers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts index 6d2fbddadcee..40abf158aa0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the authorization server. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementAuthorizationServerListSecrets.json */ async function apiManagementAuthorizationServerListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.listSecrets( - resourceGroupName, - serviceName, - authsid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.listSecrets( + resourceGroupName, + serviceName, + authsid + ); + console.log(result); } async function main() { - apiManagementAuthorizationServerListSecrets(); + apiManagementAuthorizationServerListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts index 24b94f08763c..65c70bda6ea6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationServerUpdateContract, - ApiManagementClient + ApiManagementClient, + AuthorizationServerUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateAuthorizationServer.json */ async function apiManagementUpdateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const ifMatch = "*"; - const parameters: AuthorizationServerUpdateContract = { - clientId: "update", - clientSecret: "updated", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.update( - resourceGroupName, - serviceName, - authsid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authsid = "newauthServer"; + const ifMatch = "*"; + const parameters: AuthorizationServerUpdateContract = { + clientId: "update", + clientSecret: "updated", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.update( + resourceGroupName, + serviceName, + authsid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateAuthorizationServer(); + apiManagementUpdateAuthorizationServer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts index c962b8e6b75f..d27cccafbd51 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, BackendContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a backend. @@ -21,37 +19,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json */ async function apiManagementCreateBackendProxyBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] } - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin" - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const parameters: BackendContract = { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { xMy1: ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] } + }, + proxy: { + password: "", + url: "http://192.168.1.1:8080", + username: "Contoso\\admin" + }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + resourceGroupName, + serviceName, + backendId, + parameters + ); + console.log(result); } /** @@ -61,45 +59,45 @@ async function apiManagementCreateBackendProxyBackend() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json */ async function apiManagementCreateBackendServiceFabric() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1" - } - ] - } - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const parameters: BackendContract = { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1" + } + ] + } + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + resourceGroupName, + serviceName, + backendId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateBackendProxyBackend(); - apiManagementCreateBackendServiceFabric(); + apiManagementCreateBackendProxyBackend(); + apiManagementCreateBackendServiceFabric(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts index 89e8c3271c29..ebd1024c5261 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified backend. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteBackend.json */ async function apiManagementDeleteBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.delete( - resourceGroupName, - serviceName, - backendId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.delete( + resourceGroupName, + serviceName, + backendId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteBackend(); + apiManagementDeleteBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts index 06cc146efc13..14744af4708b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadBackend.json */ async function apiManagementHeadBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.getEntityTag( - resourceGroupName, - serviceName, - backendId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.getEntityTag( + resourceGroupName, + serviceName, + backendId + ); + console.log(result); } async function main() { - apiManagementHeadBackend(); + apiManagementHeadBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts index c2d4ae96f020..15a4960f27e4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the backend specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json */ async function apiManagementGetBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.get( - resourceGroupName, - serviceName, - backendId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "sfbackend"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.get( + resourceGroupName, + serviceName, + backendId + ); + console.log(result); } async function main() { - apiManagementGetBackend(); + apiManagementGetBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts index 0ea9b79265ac..0c48ac50e91c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of backends in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListBackends.json */ async function apiManagementListBackends() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.backend.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.backend.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListBackends(); + apiManagementListBackends(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts index a60be7c63a0d..1b3404f4e8bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - BackendReconnectContract, - BackendReconnectOptionalParams, - ApiManagementClient + ApiManagementClient, + BackendReconnectContract, + BackendReconnectOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @@ -25,27 +23,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackendReconnect.json */ async function apiManagementBackendReconnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendReconnectContract = { after: "PT3S" }; - const options: BackendReconnectOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.reconnect( - resourceGroupName, - serviceName, - backendId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const parameters: BackendReconnectContract = { after: "PT3S" }; + const options: BackendReconnectOptionalParams = { parameters }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.reconnect( + resourceGroupName, + serviceName, + backendId, + options + ); + console.log(result); } async function main() { - apiManagementBackendReconnect(); + apiManagementBackendReconnect(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts index 164258fb978d..c174bbbc427e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - BackendUpdateParameters, - ApiManagementClient + ApiManagementClient, + BackendUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing backend. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateBackend.json */ async function apiManagementUpdateBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.update( - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const backendId = "proxybackend"; + const ifMatch = "*"; + const parameters: BackendUpdateParameters = { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.update( + resourceGroupName, + serviceName, + backendId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateBackend(); + apiManagementUpdateBackend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts index 7fa6eb6b20b2..c6152331b76c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, CacheContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. @@ -21,33 +19,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCache.json */ async function apiManagementCreateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const parameters: CacheContract = { - description: "Redis cache instances in West India", - connectionString: - "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", - resourceId: - "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", - useFromLocation: "default" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.createOrUpdate( - resourceGroupName, - serviceName, - cacheId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const parameters: CacheContract = { + description: "Redis cache instances in West India", + connectionString: + "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + resourceId: + "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + useFromLocation: "default" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.createOrUpdate( + resourceGroupName, + serviceName, + cacheId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateCache(); + apiManagementCreateCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts index 80b4454d8db3..4e80b216d29a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Cache. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCache.json */ async function apiManagementDeleteCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "southindia"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.delete( - resourceGroupName, - serviceName, - cacheId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "southindia"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.delete( + resourceGroupName, + serviceName, + cacheId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteCache(); + apiManagementDeleteCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts index 777ee99d6b6a..28702256b198 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCache.json */ async function apiManagementHeadCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.getEntityTag( - resourceGroupName, - serviceName, - cacheId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.getEntityTag( + resourceGroupName, + serviceName, + cacheId + ); + console.log(result); } async function main() { - apiManagementHeadCache(); + apiManagementHeadCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts index df653474196e..970727924135 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Cache specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json */ async function apiManagementGetCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.get( - resourceGroupName, - serviceName, - cacheId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.get( + resourceGroupName, + serviceName, + cacheId + ); + console.log(result); } async function main() { - apiManagementGetCache(); + apiManagementGetCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts index 655ecf451ab5..0ce37d5e1283 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCaches.json */ async function apiManagementListCaches() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cache.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.cache.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListCaches(); + apiManagementListCaches(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts index 72414be63f55..1904fe056059 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - CacheUpdateParameters, - ApiManagementClient + ApiManagementClient, + CacheUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the cache specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateCache.json */ async function apiManagementUpdateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const ifMatch = "*"; - const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.update( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const cacheId = "c1"; + const ifMatch = "*"; + const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.update( + resourceGroupName, + serviceName, + cacheId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateCache(); + apiManagementUpdateCache(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts index 39f489f9dc7f..4f055c8b11b5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - CertificateCreateOrUpdateParameters, - ApiManagementClient + ApiManagementClient, + CertificateCreateOrUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json */ async function apiManagementCreateCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: - "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "tempcert"; + const parameters: CertificateCreateOrUpdateParameters = { + data: + "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate( + resourceGroupName, + serviceName, + certificateId, + parameters + ); + console.log(result); } /** @@ -53,33 +51,33 @@ async function apiManagementCreateCertificate() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json */ async function apiManagementCreateCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const parameters: CertificateCreateOrUpdateParameters = { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate( + resourceGroupName, + serviceName, + certificateId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateCertificate(); - apiManagementCreateCertificateWithKeyVault(); + apiManagementCreateCertificate(); + apiManagementCreateCertificateWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts index 6a9d5dd55b4d..fb50c83faca2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific certificate. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCertificate.json */ async function apiManagementDeleteCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.delete( - resourceGroupName, - serviceName, - certificateId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "tempcert"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.delete( + resourceGroupName, + serviceName, + certificateId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteCertificate(); + apiManagementDeleteCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts index a10bcb576854..67cd13b609bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCertificate.json */ async function apiManagementHeadCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.getEntityTag( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.getEntityTag( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementHeadCertificate(); + apiManagementHeadCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts index ae96d2c19d89..7ee5367ad2bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the certificate specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json */ async function apiManagementGetCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetCertificate() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json */ async function apiManagementGetCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementGetCertificate(); - apiManagementGetCertificateWithKeyVault(); + apiManagementGetCertificate(); + apiManagementGetCertificateWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts index 3f53047c01a7..3ecb6a5c034f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCertificates.json */ async function apiManagementListCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificate.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.certificate.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListCertificates(); + apiManagementListCertificates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts index 2df0975cf3d9..2407b20cbe08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshCertificate.json */ async function apiManagementRefreshCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.refreshSecret( - resourceGroupName, - serviceName, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const certificateId = "templateCertkv"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.refreshSecret( + resourceGroupName, + serviceName, + certificateId + ); + console.log(result); } async function main() { - apiManagementRefreshCertificate(); + apiManagementRefreshCertificate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts index e650e8e1978c..5048318d732e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ContentItemContract, - ApiManagementClient + ApiManagementClient, + ContentItemContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. @@ -24,39 +22,39 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentTypeContentItem.json */ async function apiManagementCreateContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const parameters: ContentItemContract = { - properties: { - enUs: { - description: "Short story about the company.", - documentId: - "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - keywords: "company, about", - permalink: "/about", - title: "About" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const parameters: ContentItemContract = { + properties: { + enUs: { + description: "Short story about the company.", + documentId: + "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + keywords: "company, about", + permalink: "/about", + title: "About" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.createOrUpdate( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateContentTypeContentItem(); + apiManagementCreateContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts index 11087f6fc4f8..21b7bce13dec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content item. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentTypeContentItem.json */ async function apiManagementDeleteContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.delete( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.delete( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteContentTypeContentItem(); + apiManagementDeleteContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts index ff7b36dcc8fc..2dbf3b05e36e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadContentTypeContentItem.json */ async function apiManagementHeadContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.getEntityTag( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.getEntityTag( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId + ); + console.log(result); } async function main() { - apiManagementHeadContentTypeContentItem(); + apiManagementHeadContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts index 968f7c3e2f59..78578d698704 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentTypeContentItem.json */ async function apiManagementGetContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.get( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.get( + resourceGroupName, + serviceName, + contentTypeId, + contentItemId + ); + console.log(result); } async function main() { - apiManagementGetContentTypeContentItem(); + apiManagementGetContentTypeContentItem(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts index d5684141c4f0..80b6eafdb3a6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypeContentItems.json */ async function apiManagementListContentTypeContentItems() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.contentItem.listByService( - resourceGroupName, - serviceName, - contentTypeId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.contentItem.listByService( + resourceGroupName, + serviceName, + contentTypeId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListContentTypeContentItems(); + apiManagementListContentTypeContentItems(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts index 1bd7e4b5480e..e90c8403ff70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ContentTypeContract, - ApiManagementClient + ApiManagementClient, + ContentTypeContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. @@ -24,74 +22,74 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentType.json */ async function apiManagementCreateContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const parameters: ContentTypeContract = { - namePropertiesName: "Page", - schema: { - additionalProperties: false, - properties: { - en_us: { - type: "object", - additionalProperties: false, - properties: { - description: { - type: "string", - description: - "Page description. This property gets included in SEO attributes.", - indexed: true, - title: "Description" - }, - documentId: { - type: "string", - description: "Reference to page content document.", - title: "Document ID" - }, - keywords: { - type: "string", - description: - "Page keywords. This property gets included in SEO attributes.", - indexed: true, - title: "Keywords" - }, - permalink: { - type: "string", - description: "Page permalink, e.g. '/about'.", - indexed: true, - title: "Permalink" - }, - title: { - type: "string", - description: - "Page title. This property gets included in SEO attributes.", - indexed: true, - title: "Title" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const parameters: ContentTypeContract = { + namePropertiesName: "Page", + schema: { + additionalProperties: false, + properties: { + en_us: { + type: "object", + additionalProperties: false, + properties: { + description: { + type: "string", + description: + "Page description. This property gets included in SEO attributes.", + indexed: true, + title: "Description" + }, + documentId: { + type: "string", + description: "Reference to page content document.", + title: "Document ID" + }, + keywords: { + type: "string", + description: + "Page keywords. This property gets included in SEO attributes.", + indexed: true, + title: "Keywords" + }, + permalink: { + type: "string", + description: "Page permalink, e.g. '/about'.", + indexed: true, + title: "Permalink" + }, + title: { + type: "string", + description: + "Page title. This property gets included in SEO attributes.", + indexed: true, + title: "Title" + } + }, + required: ["title", "permalink", "documentId"] + } } - }, - required: ["title", "permalink", "documentId"] - } - } - }, - description: "A regular page", - version: "1.0.0" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - parameters - ); - console.log(result); + }, + description: "A regular page", + version: "1.0.0" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.createOrUpdate( + resourceGroupName, + serviceName, + contentTypeId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateContentType(); + apiManagementCreateContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts index 06a31ac831f8..b78a3b974709 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentType.json */ async function apiManagementDeleteContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.delete( - resourceGroupName, - serviceName, - contentTypeId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.delete( + resourceGroupName, + serviceName, + contentTypeId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteContentType(); + apiManagementDeleteContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts index 704be3e32425..f10d53d36989 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentType.json */ async function apiManagementGetContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.get( - resourceGroupName, - serviceName, - contentTypeId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const contentTypeId = "page"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.get( + resourceGroupName, + serviceName, + contentTypeId + ); + console.log(result); } async function main() { - apiManagementGetContentType(); + apiManagementGetContentType(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts index bfa265259683..2b3000b24950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypes.json */ async function apiManagementListContentTypes() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.contentType.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.contentType.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListContentTypes(); + apiManagementListContentTypes(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts index fc1b1af5df15..d380f16234de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalDelegationSettings, - DelegationSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + DelegationSettingsCreateOrUpdateOptionalParams, + PortalDelegationSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Delegation settings. @@ -25,32 +23,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutDelegation.json */ async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "" - }; - const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalDelegationSettings = { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "" + }; + const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateDelegation(); + apiManagementPortalSettingsUpdateDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts index b475a59e8cae..129b73975d6e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDelegationSettings.json */ async function apiManagementHeadDelegationSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadDelegationSettings(); + apiManagementHeadDelegationSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts index 75b202cf5f2d..2adbcd6b1339 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Delegation Settings for the Portal. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetDelegation.json */ async function apiManagementPortalSettingsGetDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetDelegation(); + apiManagementPortalSettingsGetDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts index e25d4dbb0799..aba969b4175d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json */ async function apiManagementListSecretsPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.listSecrets( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.listSecrets( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListSecretsPortalSettings(); + apiManagementListSecretsPortalSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts index 7b55289658ab..ebce71d5b438 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalDelegationSettings, - ApiManagementClient + ApiManagementClient, + PortalDelegationSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Delegation settings. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json */ async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalDelegationSettings = { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateDelegation(); + apiManagementPortalSettingsUpdateDelegation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts index 337137849a4c..415b8e715ad6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get soft-deleted Api Management Service by name. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json */ async function apiManagementGetDeletedServiceByName() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.getByName(serviceName, location); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const serviceName = "apimService3"; + const location = "westus"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.getByName(serviceName, location); + console.log(result); } async function main() { - apiManagementGetDeletedServiceByName(); + apiManagementGetDeletedServiceByName(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts index 5eeb2e8df550..704e451971f8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesListBySubscription.json */ async function apiManagementDeletedServicesListBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.deletedServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.deletedServices.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementDeletedServicesListBySubscription(); + apiManagementDeletedServicesListBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts index a94e70bc93a6..51dd10773a74 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesPurge.json */ async function apiManagementDeletedServicesPurge() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.beginPurgeAndWait( - serviceName, - location - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const serviceName = "apimService3"; + const location = "westus"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.beginPurgeAndWait( + serviceName, + location + ); + console.log(result); } async function main() { - apiManagementDeletedServicesPurge(); + apiManagementDeletedServicesPurge(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts index 70a9099bd2df..62fda80fc456 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. @@ -24,38 +22,38 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDiagnostic.json */ async function apiManagementCreateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.createOrUpdate( - resourceGroupName, - serviceName, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.createOrUpdate( + resourceGroupName, + serviceName, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateDiagnostic(); + apiManagementCreateDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts index bf4f61249fba..87adb331142c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDiagnostic.json */ async function apiManagementDeleteDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.delete( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.delete( + resourceGroupName, + serviceName, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteDiagnostic(); + apiManagementDeleteDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts index bf02e420f049..0f48b1f994a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDiagnostic.json */ async function apiManagementHeadDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.getEntityTag( - resourceGroupName, - serviceName, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.getEntityTag( + resourceGroupName, + serviceName, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadDiagnostic(); + apiManagementHeadDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts index 2f03f3c2761e..dfb1958cab7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json */ async function apiManagementGetDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.get( - resourceGroupName, - serviceName, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.get( + resourceGroupName, + serviceName, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetDiagnostic(); + apiManagementGetDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts index af3227d1b4ee..b25f71632ba7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDiagnostics.json */ async function apiManagementListDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnostic.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.diagnostic.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListDiagnostics(); + apiManagementListDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts index 25129fa4da7f..93451744909c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDiagnostic.json */ async function apiManagementUpdateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.update( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.update( + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateDiagnostic(); + apiManagementUpdateDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts index c93160bb7a2a..a602836a4d6e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DocumentationContract, - ApiManagementClient + ApiManagementClient, + DocumentationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Documentation or updates an existing one. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDocumentation.json */ async function apiManagementCreateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationContract = { - content: "content", - title: "Title" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.createOrUpdate( - resourceGroupName, - serviceName, - documentationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const parameters: DocumentationContract = { + content: "content", + title: "Title" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.createOrUpdate( + resourceGroupName, + serviceName, + documentationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateDocumentation(); + apiManagementCreateDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts index 53e3bffd4cf8..5032a6d02acd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Documentation from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDocumentation.json */ async function apiManagementDeleteDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.delete( - resourceGroupName, - serviceName, - documentationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.delete( + resourceGroupName, + serviceName, + documentationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteDocumentation(); + apiManagementDeleteDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts index 759b162c1923..6af5542c3867 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDocumentation.json */ async function apiManagementHeadDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.getEntityTag( - resourceGroupName, - serviceName, - documentationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.getEntityTag( + resourceGroupName, + serviceName, + documentationId + ); + console.log(result); } async function main() { - apiManagementHeadDocumentation(); + apiManagementHeadDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts index 36c1dee0d237..564a20f12673 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json */ async function apiManagementGetDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.get( - resourceGroupName, - serviceName, - documentationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.get( + resourceGroupName, + serviceName, + documentationId + ); + console.log(result); } async function main() { - apiManagementGetDocumentation(); + apiManagementGetDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts index 81d580cba1c0..554dd0ed3057 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Documentations of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDocumentations.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.documentation.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.documentation.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts index 75c50bab8387..9c90dd81c90a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DocumentationUpdateContract, - ApiManagementClient + ApiManagementClient, + DocumentationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDocumentation.json */ async function apiManagementUpdateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: DocumentationUpdateContract = { - content: "content updated", - title: "Title updated" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.update( - resourceGroupName, - serviceName, - documentationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const documentationId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: DocumentationUpdateContract = { + content: "content updated", + title: "Title updated" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.update( + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateDocumentation(); + apiManagementUpdateDocumentation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts index 7728b147c808..dfdf69296881 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - EmailTemplateUpdateParameters, - ApiManagementClient + ApiManagementClient, + EmailTemplateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an Email Template. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTemplate.json */ async function apiManagementCreateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const parameters: EmailTemplateUpdateParameters = { - subject: "Your request for $IssueName was successfully received." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.createOrUpdate( - resourceGroupName, - serviceName, - templateName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const parameters: EmailTemplateUpdateParameters = { + subject: "Your request for $IssueName was successfully received." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.createOrUpdate( + resourceGroupName, + serviceName, + templateName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTemplate(); + apiManagementCreateTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts index b71dcb4448f2..f59e61e61901 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTemplate.json */ async function apiManagementDeleteTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.delete( - resourceGroupName, - serviceName, - templateName, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.delete( + resourceGroupName, + serviceName, + templateName, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteTemplate(); + apiManagementDeleteTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts index 16ef6774de91..7395a67ea5ab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadEmailTemplate.json */ async function apiManagementHeadEmailTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.getEntityTag( - resourceGroupName, - serviceName, - templateName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.getEntityTag( + resourceGroupName, + serviceName, + templateName + ); + console.log(result); } async function main() { - apiManagementHeadEmailTemplate(); + apiManagementHeadEmailTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts index aeca9f9c866f..708654cb5232 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the email template specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json */ async function apiManagementGetTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.get( - resourceGroupName, - serviceName, - templateName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.get( + resourceGroupName, + serviceName, + templateName + ); + console.log(result); } async function main() { - apiManagementGetTemplate(); + apiManagementGetTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts index 63bc176c0c17..1b51d61e52dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all email templates @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTemplates.json */ async function apiManagementListTemplates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.emailTemplate.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.emailTemplate.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTemplates(); + apiManagementListTemplates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts index 8d8bc4674f2a..8e2ec3a44b2c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - EmailTemplateUpdateParameters, - ApiManagementClient + ApiManagementClient, + EmailTemplateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates API Management email template @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTemplate.json */ async function apiManagementUpdateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const parameters: EmailTemplateUpdateParameters = { - body: - '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', - subject: "Your request $IssueName was received" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.update( - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const templateName = "newIssueNotificationMessage"; + const ifMatch = "*"; + const parameters: EmailTemplateUpdateParameters = { + body: + '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', + subject: "Your request $IssueName was received" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.update( + resourceGroupName, + serviceName, + templateName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTemplate(); + apiManagementUpdateTemplate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts index 18d91215c721..03b8a90c03db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AssociationContract, - GatewayApiCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + AssociationContract, + GatewayApiCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified Gateway. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayApi.json */ async function apiManagementCreateGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const parameters: AssociationContract = { provisioningState: "created" }; - const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - apiId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "echo-api"; + const parameters: AssociationContract = { provisioningState: "created" }; + const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + apiId, + options + ); + console.log(result); } async function main() { - apiManagementCreateGatewayApi(); + apiManagementCreateGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts index 545a5fb3fa6c..dcb5d6aeabb1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified Gateway. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayApi.json */ async function apiManagementDeleteGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.delete( - resourceGroupName, - serviceName, - gatewayId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.delete( + resourceGroupName, + serviceName, + gatewayId, + apiId + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayApi(); + apiManagementDeleteGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts index c76d571bda2b..2dd9a8cd645c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayApi.json */ async function apiManagementHeadGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "api1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const apiId = "api1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayApi(); + apiManagementHeadGatewayApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts index 219156cf842f..da92a5697bea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayApis.json */ async function apiManagementListGatewayApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayApi.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayApi.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewayApis(); + apiManagementListGatewayApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts index 7f02030ccead..cccafedf4a55 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayCertificateAuthorityContract, - ApiManagementClient + ApiManagementClient, + GatewayCertificateAuthorityContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json */ async function apiManagementCreateGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGatewayCertificateAuthority(); + apiManagementCreateGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts index 64119cc426fe..08a6fc2c1ee7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json */ async function apiManagementDeleteGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.delete( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "default"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.delete( + resourceGroupName, + serviceName, + gatewayId, + certificateId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayCertificateAuthority(); + apiManagementDeleteGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts index ad89c233c59d..17ca36839d5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json */ async function apiManagementHeadGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + certificateId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayCertificateAuthority(); + apiManagementHeadGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts index 91b55f332cfd..cf3b4570889f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get assigned Gateway Certificate Authority details. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json */ async function apiManagementGetGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.get( - resourceGroupName, - serviceName, - gatewayId, - certificateId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const certificateId = "cert1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.get( + resourceGroupName, + serviceName, + gatewayId, + certificateId + ); + console.log(result); } async function main() { - apiManagementGetGatewayCertificateAuthority(); + apiManagementGetGatewayCertificateAuthority(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts index 46ca481ae49a..839c905cf29e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json */ async function apiManagementListGatewaycertificateAuthorities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayCertificateAuthority.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayCertificateAuthority.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewaycertificateAuthorities(); + apiManagementListGatewaycertificateAuthorities(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts index f9591b69eda0..fbab656e2a12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, GatewayContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGateway.json */ async function apiManagementCreateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const parameters: GatewayContract = { + description: "my gateway 1", + locationData: { name: "my location" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGateway(); + apiManagementCreateGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts index 1bea683bd048..0de14e313b2a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Gateway. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGateway.json */ async function apiManagementDeleteGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.delete( - resourceGroupName, - serviceName, - gatewayId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.delete( + resourceGroupName, + serviceName, + gatewayId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGateway(); + apiManagementDeleteGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts index 80a2efeba293..79c937d79485 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayTokenRequestContract, - ApiManagementClient + ApiManagementClient, + GatewayTokenRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayGenerateToken.json */ async function apiManagementGatewayGenerateToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayTokenRequestContract = { - expiry: new Date("2020-04-21T00:44:24.2845269Z"), - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.generateToken( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const parameters: GatewayTokenRequestContract = { + expiry: new Date("2020-04-21T00:44:24.2845269Z"), + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.generateToken( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementGatewayGenerateToken(); + apiManagementGatewayGenerateToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts index 0f48e7d8330d..709fc18b16a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGateway.json */ async function apiManagementHeadGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "mygateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.getEntityTag( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "mygateway"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.getEntityTag( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementHeadGateway(); + apiManagementHeadGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts index c1bdd463a2c0..600f88baaa34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json */ async function apiManagementGetGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.get( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.get( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementGetGateway(); + apiManagementGetGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts index 1639e06ed352..a31c62e9a795 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayHostnameConfigurationContract, - ApiManagementClient + ApiManagementClient, + GatewayHostnameConfigurationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. @@ -24,36 +22,36 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json */ async function apiManagementCreateGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const parameters: GatewayHostnameConfigurationContract = { - certificateId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - hostname: "*", - http2Enabled: true, - negotiateClientCertificate: false, - tls10Enabled: false, - tls11Enabled: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - hcId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const parameters: GatewayHostnameConfigurationContract = { + certificateId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + hostname: "*", + http2Enabled: true, + negotiateClientCertificate: false, + tls10Enabled: false, + tls11Enabled: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.createOrUpdate( + resourceGroupName, + serviceName, + gatewayId, + hcId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGatewayHostnameConfiguration(); + apiManagementCreateGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts index 54c551d5ca3f..605f4dd2e01b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json */ async function apiManagementDeleteGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.delete( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.delete( + resourceGroupName, + serviceName, + gatewayId, + hcId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGatewayHostnameConfiguration(); + apiManagementDeleteGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts index 3b69b1ded4ac..4d8614c156c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json */ async function apiManagementHeadGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - hcId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.getEntityTag( + resourceGroupName, + serviceName, + gatewayId, + hcId + ); + console.log(result); } async function main() { - apiManagementHeadGatewayHostnameConfiguration(); + apiManagementHeadGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts index 5d4c94cf881c..819b7e39a380 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get details of a hostname configuration @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json */ async function apiManagementGetGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.get( - resourceGroupName, - serviceName, - gatewayId, - hcId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const hcId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.get( + resourceGroupName, + serviceName, + gatewayId, + hcId + ); + console.log(result); } async function main() { - apiManagementGetGatewayHostnameConfiguration(); + apiManagementGetGatewayHostnameConfiguration(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts index 601b7cdf9380..5ac2e5ae07c9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json */ async function apiManagementListGatewayHostnameConfigurations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gatewayHostnameConfiguration.listByService( - resourceGroupName, - serviceName, - gatewayId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gatewayHostnameConfiguration.listByService( + resourceGroupName, + serviceName, + gatewayId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGatewayHostnameConfigurations(); + apiManagementListGatewayHostnameConfigurations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts index c46a48468460..4e60fdffb44f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of gateways registered with service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGateways.json */ async function apiManagementListGateways() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.gateway.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateway.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGateways(); + apiManagementListGateways(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts index 5336e78a40e4..9a32dcf7b7dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves gateway keys. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayListKeys.json */ async function apiManagementGatewayListKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listKeys( - resourceGroupName, - serviceName, - gatewayId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listKeys( + resourceGroupName, + serviceName, + gatewayId + ); + console.log(result); } async function main() { - apiManagementGatewayListKeys(); + apiManagementGatewayListKeys(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts index b926cf8923ca..efd6f9a35965 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GatewayKeyRegenerationRequestContract, - ApiManagementClient + ApiManagementClient, + GatewayKeyRegenerationRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayRegenerateKey.json */ async function apiManagementGatewayRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gwId"; - const parameters: GatewayKeyRegenerationRequestContract = { - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.regenerateKey( - resourceGroupName, - serviceName, - gatewayId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gwId"; + const parameters: GatewayKeyRegenerationRequestContract = { + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.regenerateKey( + resourceGroupName, + serviceName, + gatewayId, + parameters + ); + console.log(result); } async function main() { - apiManagementGatewayRegenerateKey(); + apiManagementGatewayRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts index 42aac3e1f49b..8d787eeb54ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, GatewayContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the gateway specified by its identifier. @@ -21,31 +19,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGateway.json */ async function apiManagementUpdateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.update( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const gatewayId = "gw1"; + const ifMatch = "*"; + const parameters: GatewayContract = { + description: "my gateway 1", + locationData: { name: "my location" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.update( + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGateway(); + apiManagementUpdateGateway(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts index 32ac578cfd09..18330a36f124 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GlobalSchemaContract, - ApiManagementClient + ApiManagementClient, + GlobalSchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json */ async function apiManagementCreateSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const parameters: GlobalSchemaContract = { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + schemaId, + parameters + ); + console.log(result); } /** @@ -54,46 +52,46 @@ async function apiManagementCreateSchema1() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json */ async function apiManagementCreateSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - document: { - type: "object", - $id: "https://example.com/person.schema.json", - $schema: "https://json-schema.org/draft/2020-12/schema", - properties: { - age: { - type: "integer", - description: - "Age in years which must be equal to or greater than zero.", - minimum: 0 + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const parameters: GlobalSchemaContract = { + description: "sample schema description", + document: { + type: "object", + $id: "https://example.com/person.schema.json", + $schema: "https://json-schema.org/draft/2020-12/schema", + properties: { + age: { + type: "integer", + description: + "Age in years which must be equal to or greater than zero.", + minimum: 0 + }, + firstName: { type: "string", description: "The person's first name." }, + lastName: { type: "string", description: "The person's last name." } + }, + title: "Person" }, - firstName: { type: "string", description: "The person's first name." }, - lastName: { type: "string", description: "The person's last name." } - }, - title: "Person" - }, - schemaType: "json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters - ); - console.log(result); + schemaType: "json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateSchema1(); - apiManagementCreateSchema2(); + apiManagementCreateSchema1(); + apiManagementCreateSchema2(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts index 5dbe2be68ada..25a5e7d0b6b3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Schema. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGlobalSchema.json */ async function apiManagementDeleteSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.delete( - resourceGroupName, - serviceName, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.delete( + resourceGroupName, + serviceName, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteSchema(); + apiManagementDeleteSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts index 2a51c0f0c444..a8985608c553 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGlobalSchema.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.getEntityTag( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "myschema"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.getEntityTag( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts index 42db81867552..b351b86e5827 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Schema specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json */ async function apiManagementGetSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetSchema1() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json */ async function apiManagementGetSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const schemaId = "schema2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get( + resourceGroupName, + serviceName, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetSchema1(); - apiManagementGetSchema2(); + apiManagementGetSchema1(); + apiManagementGetSchema2(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts index ccf80484dc1b..0eb8472e9d54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of schemas registered with service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGlobalSchemas.json */ async function apiManagementListSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.globalSchema.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.globalSchema.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSchemas(); + apiManagementListSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts index 0be021db2d26..edaa4ae10615 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ResolverContract, - ApiManagementClient + ApiManagementClient, + ResolverContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolver.json */ async function apiManagementCreateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "someAPI"; - const resolverId = "newResolver"; - const parameters: ResolverContract = { - path: "Query/users", - description: "A GraphQL Resolver example", - displayName: "Query Users" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "someAPI"; + const resolverId = "newResolver"; + const parameters: ResolverContract = { + path: "Query/users", + description: "A GraphQL Resolver example", + displayName: "Query Users" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGraphQlApiResolver(); + apiManagementCreateGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts index 1245129ed7b1..1b9bc62badce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolver.json */ async function apiManagementDeleteGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.delete( + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGraphQlApiResolver(); + apiManagementDeleteGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts index b731793feb11..b48ca61698d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolver.json */ async function apiManagementHeadGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.getEntityTag( + resourceGroupName, + serviceName, + apiId, + resolverId + ); + console.log(result); } async function main() { - apiManagementHeadGraphQlApiResolver(); + apiManagementHeadGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts index 465795df47aa..52775601a59c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json */ async function apiManagementGetGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.get( - resourceGroupName, - serviceName, - apiId, - resolverId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const resolverId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.get( + resourceGroupName, + serviceName, + apiId, + resolverId + ); + console.log(result); } async function main() { - apiManagementGetGraphQlApiResolver(); + apiManagementGetGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts index 214ff987de36..a2275abefd88 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolvers.json */ async function apiManagementListGraphQlApiResolvers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.graphQLApiResolver.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphQLApiResolver.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGraphQlApiResolvers(); + apiManagementListGraphQlApiResolvers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts index a5d83821ea5a..f935e1d885bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. @@ -25,39 +23,39 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json */ async function apiManagementCreateGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const resolverId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - 'GET/api/users' - }; - const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { - ifMatch - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const resolverId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + 'GET/api/users' + }; + const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { + ifMatch + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateGraphQlApiResolverPolicy(); + apiManagementCreateGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts index 8d1d88254c10..c008ddf275d5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json */ async function apiManagementDeleteGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const resolverId = "testResolver"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const resolverId = "testResolver"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.delete( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGraphQlApiResolverPolicy(); + apiManagementDeleteGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts index 9833f1305764..132e4e42a0d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json */ async function apiManagementHeadGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const resolverId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadGraphQlApiResolverPolicy(); + apiManagementHeadGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts index 97caed6b595f..1009e6732d6c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json */ async function apiManagementGetGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const resolverId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.get( + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetGraphQlApiResolverPolicy(); + apiManagementGetGraphQlApiResolverPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts index d5197b45a4a2..c0cd57b20e7b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolverPolicies.json */ async function apiManagementListGraphQlApiResolverPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const resolverId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.graphQLApiResolverPolicy.listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const resolverId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.graphQLApiResolverPolicy.listByResolver( + resourceGroupName, + serviceName, + apiId, + resolverId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGraphQlApiResolverPolicies(); + apiManagementListGraphQlApiResolverPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts index 8f314c52b3b0..daa4d9f2b8a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ResolverUpdateContract, - ApiManagementClient + ApiManagementClient, + ResolverUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGraphQLApiResolver.json */ async function apiManagementUpdateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const resolverId = "resolverId"; - const ifMatch = "*"; - const parameters: ResolverUpdateContract = { - path: "Query/adminUsers", - description: "A GraphQL Resolver example", - displayName: "Query AdminUsers" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.update( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const resolverId = "resolverId"; + const ifMatch = "*"; + const parameters: ResolverUpdateContract = { + path: "Query/adminUsers", + description: "A GraphQL Resolver example", + displayName: "Query AdminUsers" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.update( + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGraphQlApiResolver(); + apiManagementUpdateGraphQlApiResolver(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts index 9f2b325d87e5..6c172c1f05e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GroupCreateParameters, - ApiManagementClient + ApiManagementClient, + GroupCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a group. @@ -24,22 +22,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroup.json */ async function apiManagementCreateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const parameters: GroupCreateParameters = { displayName: "temp group" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate( + resourceGroupName, + serviceName, + groupId, + parameters + ); + console.log(result); } /** @@ -49,33 +47,33 @@ async function apiManagementCreateGroup() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupExternal.json */ async function apiManagementCreateGroupExternal() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "aadGroup"; + const parameters: GroupCreateParameters = { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: + "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate( + resourceGroupName, + serviceName, + groupId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateGroup(); - apiManagementCreateGroupExternal(); + apiManagementCreateGroup(); + apiManagementCreateGroupExternal(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts index 48247657e14d..0dbc9e93ac37 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific group of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroup.json */ async function apiManagementDeleteGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.delete( - resourceGroupName, - serviceName, - groupId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "aadGroup"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.delete( + resourceGroupName, + serviceName, + groupId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteGroup(); + apiManagementDeleteGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts index a68c30cc8bfa..2a928af3a011 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroup.json */ async function apiManagementHeadGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.getEntityTag( - resourceGroupName, - serviceName, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.getEntityTag( + resourceGroupName, + serviceName, + groupId + ); + console.log(result); } async function main() { - apiManagementHeadGroup(); + apiManagementHeadGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts index 954018f98006..2514d2935698 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the group specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json */ async function apiManagementGetGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.get( - resourceGroupName, - serviceName, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.get( + resourceGroupName, + serviceName, + groupId + ); + console.log(result); } async function main() { - apiManagementGetGroup(); + apiManagementGetGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts index 898b9bd81891..e0e07c28be7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of groups defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroups.json */ async function apiManagementListGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.group.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.group.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGroups(); + apiManagementListGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts index 0b10d48bb5f0..84c36923ea92 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - GroupUpdateParameters, - ApiManagementClient + ApiManagementClient, + GroupUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the group specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGroup.json */ async function apiManagementUpdateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.update( - resourceGroupName, - serviceName, - groupId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const ifMatch = "*"; + const parameters: GroupUpdateParameters = { displayName: "temp group" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.update( + resourceGroupName, + serviceName, + groupId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateGroup(); + apiManagementUpdateGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts index 80e1301ef726..e2adcd467b1f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroupUser.json */ async function apiManagementHeadGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.checkEntityExists( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.checkEntityExists( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementHeadGroupUser(); + apiManagementHeadGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts index 478e1258ad62..9a8ce2443238 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add existing user to existing group @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupUser.json */ async function apiManagementCreateGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.create( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "tempgroup"; + const userId = "59307d350af58404d8a26300"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.create( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementCreateGroupUser(); + apiManagementCreateGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts index 0eaf12e68670..a281041716f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove existing user from existing group. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroupUser.json */ async function apiManagementDeleteGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.delete( - resourceGroupName, - serviceName, - groupId, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "templategroup"; + const userId = "59307d350af58404d8a26300"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.delete( + resourceGroupName, + serviceName, + groupId, + userId + ); + console.log(result); } async function main() { - apiManagementDeleteGroupUser(); + apiManagementDeleteGroupUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts index fd400a0f3b46..e994361dc1fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of user entities associated with the group. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroupUsers.json */ async function apiManagementListGroupUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.groupUser.list( - resourceGroupName, - serviceName, - groupId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const groupId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.groupUser.list( + resourceGroupName, + serviceName, + groupId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListGroupUsers(); + apiManagementListGroupUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts index ecfeceb3981f..97ab9676ff0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IdentityProviderCreateContract, - ApiManagementClient + ApiManagementClient, + IdentityProviderCreateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateIdentityProvider.json */ async function apiManagementCreateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const parameters: IdentityProviderCreateContract = { - clientId: "facebookid", - clientSecret: "facebookapplicationsecret" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.createOrUpdate( - resourceGroupName, - serviceName, - identityProviderName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "facebook"; + const parameters: IdentityProviderCreateContract = { + clientId: "facebookid", + clientSecret: "facebookapplicationsecret" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.createOrUpdate( + resourceGroupName, + serviceName, + identityProviderName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateIdentityProvider(); + apiManagementCreateIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts index 71a8daa2cbde..7b77aaa72089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified identity provider configuration. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteIdentityProvider.json */ async function apiManagementDeleteIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aad"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.delete( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aad"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.delete( + resourceGroupName, + serviceName, + identityProviderName, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteIdentityProvider(); + apiManagementDeleteIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts index 09632aa479ab..608737f7fe00 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadIdentityProvider.json */ async function apiManagementHeadIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.getEntityTag( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.getEntityTag( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementHeadIdentityProvider(); + apiManagementHeadIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts index 8b752758b132..72caa0f963f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json */ async function apiManagementGetIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.get( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.get( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementGetIdentityProvider(); + apiManagementGetIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts index 5bb324ed67cf..b7ce25de18fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIdentityProviders.json */ async function apiManagementListIdentityProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.identityProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.identityProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListIdentityProviders(); + apiManagementListIdentityProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts index 70a322ad24bf..694c3524ed93 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the Identity Provider. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementIdentityProviderListSecrets.json */ async function apiManagementIdentityProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.listSecrets( - resourceGroupName, - serviceName, - identityProviderName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "aadB2C"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.listSecrets( + resourceGroupName, + serviceName, + identityProviderName + ); + console.log(result); } async function main() { - apiManagementIdentityProviderListSecrets(); + apiManagementIdentityProviderListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts index 0baf25c1a6bb..852d94346ff6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IdentityProviderUpdateParameters, - ApiManagementClient + ApiManagementClient, + IdentityProviderUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing IdentityProvider configuration. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateIdentityProvider.json */ async function apiManagementUpdateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const ifMatch = "*"; - const parameters: IdentityProviderUpdateParameters = { - clientId: "updatedfacebookid", - clientSecret: "updatedfacebooksecret" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.update( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const identityProviderName = "facebook"; + const ifMatch = "*"; + const parameters: IdentityProviderUpdateParameters = { + clientId: "updatedfacebookid", + clientSecret: "updatedfacebooksecret" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.update( + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateIdentityProvider(); + apiManagementUpdateIdentityProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts index 9402037685c9..1de2e06c98dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets API Management issue details @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json */ async function apiManagementGetIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.issue.get( - resourceGroupName, - serviceName, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.issue.get( + resourceGroupName, + serviceName, + issueId + ); + console.log(result); } async function main() { - apiManagementGetIssue(); + apiManagementGetIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts index e03dde4ead14..392e59822662 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of issues in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIssues.json */ async function apiManagementListIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.issue.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.issue.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListIssues(); + apiManagementListIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts index c3c5cb5ef180..eb78000d52fc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, LoggerContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a logger. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAILogger.json */ async function apiManagementCreateAiLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "loggerId"; + const parameters: LoggerContract = { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate( + resourceGroupName, + serviceName, + loggerId, + parameters + ); + console.log(result); } /** @@ -50,35 +48,35 @@ async function apiManagementCreateAiLogger() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateEHLogger.json */ async function apiManagementCreateEhLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" - }, - loggerType: "azureEventHub" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "eh1"; + const parameters: LoggerContract = { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" + }, + loggerType: "azureEventHub" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate( + resourceGroupName, + serviceName, + loggerId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAiLogger(); - apiManagementCreateEhLogger(); + apiManagementCreateAiLogger(); + apiManagementCreateEhLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts index 14c89372bfbb..737d1be913e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified logger. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteLogger.json */ async function apiManagementDeleteLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.delete( - resourceGroupName, - serviceName, - loggerId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "loggerId"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.delete( + resourceGroupName, + serviceName, + loggerId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteLogger(); + apiManagementDeleteLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts index c2efb9adfe7f..db93db4e2683 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadLogger.json */ async function apiManagementHeadLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.getEntityTag( - resourceGroupName, - serviceName, - loggerId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "templateLogger"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.getEntityTag( + resourceGroupName, + serviceName, + loggerId + ); + console.log(result); } async function main() { - apiManagementHeadLogger(); + apiManagementHeadLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts index 319d80a96ad3..898d846846b3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the logger specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json */ async function apiManagementGetLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.get( - resourceGroupName, - serviceName, - loggerId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "templateLogger"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.get( + resourceGroupName, + serviceName, + loggerId + ); + console.log(result); } async function main() { - apiManagementGetLogger(); + apiManagementGetLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts index 8e8d29247d7d..05562b8132fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of loggers in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListLoggers.json */ async function apiManagementListLoggers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.logger.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.logger.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListLoggers(); + apiManagementListLoggers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts index 7bec1a7e2aed..2fd80f8530f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - LoggerUpdateContract, - ApiManagementClient + ApiManagementClient, + LoggerUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing logger. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateLogger.json */ async function apiManagementUpdateLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.update( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const loggerId = "eh1"; + const ifMatch = "*"; + const parameters: LoggerUpdateContract = { + description: "updating description", + loggerType: "azureEventHub" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.update( + resourceGroupName, + serviceName, + loggerId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateLogger(); + apiManagementUpdateLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts index b664bf11298b..857f544ebf90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - NamedValueCreateContract, - ApiManagementClient + ApiManagementClient, + NamedValueCreateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates named value. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValue.json */ async function apiManagementCreateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const parameters: NamedValueCreateContract = { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar"], + value: "propValue" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + parameters + ); + console.log(result); } /** @@ -54,35 +52,35 @@ async function apiManagementCreateNamedValue() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json */ async function apiManagementCreateNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret" - }, - secret: true, - tags: ["foo", "bar"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop6"; + const parameters: NamedValueCreateContract = { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret" + }, + secret: true, + tags: ["foo", "bar"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateNamedValue(); - apiManagementCreateNamedValueWithKeyVault(); + apiManagementCreateNamedValue(); + apiManagementCreateNamedValueWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts index c912a4917fb8..4e7dde7462c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific named value from the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNamedValue.json */ async function apiManagementDeleteNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.delete( - resourceGroupName, - serviceName, - namedValueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.delete( + resourceGroupName, + serviceName, + namedValueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteNamedValue(); + apiManagementDeleteNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts index 684c6668907c..c06dfb552dc6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNamedValue.json */ async function apiManagementHeadNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.getEntityTag( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.getEntityTag( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementHeadNamedValue(); + apiManagementHeadNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts index 5d09d87343c4..5101b22fa34c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the named value specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json */ async function apiManagementGetNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetNamedValue() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json */ async function apiManagementGetNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop6"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementGetNamedValue(); - apiManagementGetNamedValueWithKeyVault(); + apiManagementGetNamedValue(); + apiManagementGetNamedValueWithKeyVault(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts index e05a515d0cd9..0cc93ee74850 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of named values defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNamedValues.json */ async function apiManagementListNamedValues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.namedValue.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.namedValue.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListNamedValues(); + apiManagementListNamedValues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts index 7315ca2e36fd..413affbf42e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementNamedValueListValue.json */ async function apiManagementNamedValueListValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.listValue( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testarmTemplateproperties2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.listValue( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementNamedValueListValue(); + apiManagementNamedValueListValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts index d8b65d0629f4..9765d1f0bc08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshNamedValue.json */ async function apiManagementRefreshNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - namedValueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginRefreshSecretAndWait( + resourceGroupName, + serviceName, + namedValueId + ); + console.log(result); } async function main() { - apiManagementRefreshNamedValue(); + apiManagementRefreshNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts index 9fd0bbc236ff..4c0db3b69c8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - NamedValueUpdateParameters, - ApiManagementClient + ApiManagementClient, + NamedValueUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific named value. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateNamedValue.json */ async function apiManagementUpdateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const namedValueId = "testprop2"; + const ifMatch = "*"; + const parameters: NamedValueUpdateParameters = { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar2"], + value: "propValue" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.beginUpdateAndWait( + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateNamedValue(); + apiManagementUpdateNamedValue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts index dcbf086b6585..e886a47bcf8b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json */ async function apiManagementServiceGetNetworkStatusByLocation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const locationName = "North Central US"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByLocation( - resourceGroupName, - serviceName, - locationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const locationName = "North Central US"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByLocation( + resourceGroupName, + serviceName, + locationName + ); + console.log(result); } async function main() { - apiManagementServiceGetNetworkStatusByLocation(); + apiManagementServiceGetNetworkStatusByLocation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts index 48fb6a23d155..1f3be805dcbb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatus.json */ async function apiManagementServiceGetNetworkStatus() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetNetworkStatus(); + apiManagementServiceGetNetworkStatus(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts index 95fa2dd5381c..ee7ebba9db67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update API Management publisher notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json */ async function apiManagementCreateNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.createOrUpdate( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.createOrUpdate( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementCreateNotification(); + apiManagementCreateNotification(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts index 2a08272429b9..576796025da6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Notification specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json */ async function apiManagementGetNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.get( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.get( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementGetNotification(); + apiManagementGetNotification(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts index 95e627c3ccee..a018938d3112 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of properties defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotifications.json */ async function apiManagementListNotifications() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.notification.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.notification.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListNotifications(); + apiManagementListNotifications(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts index 4441a393355a..9a214db8833e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json */ async function apiManagementHeadNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "contoso@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.checkEntityExists( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementHeadNotificationRecipientEmail(); + apiManagementHeadNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts index 023934f6b822..dc7406a4a48c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json */ async function apiManagementCreateNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "foobar@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.createOrUpdate( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementCreateNotificationRecipientEmail(); + apiManagementCreateNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts index 50dfa04d1459..7ee3a5319a4d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the email from the list of Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json */ async function apiManagementDeleteNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.delete( - resourceGroupName, - serviceName, - notificationName, - email - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const email = "contoso@live.com"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.delete( + resourceGroupName, + serviceName, + notificationName, + email + ); + console.log(result); } async function main() { - apiManagementDeleteNotificationRecipientEmail(); + apiManagementDeleteNotificationRecipientEmail(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts index 9fff72cb91b0..ed238365d6e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientEmails.json */ async function apiManagementListNotificationRecipientEmails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.listByNotification( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementListNotificationRecipientEmails(); + apiManagementListNotificationRecipientEmails(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts index bb3198fff996..b084c3c76077 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientUser.json */ async function apiManagementHeadNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.checkEntityExists( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementHeadNotificationRecipientUser(); + apiManagementHeadNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts index ecd636d6d144..6e503a485e02 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientUser.json */ async function apiManagementCreateNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.createOrUpdate( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementCreateNotificationRecipientUser(); + apiManagementCreateNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts index 4b9a9cffdc73..12c02278e707 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the API Management user from the list of Notification. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json */ async function apiManagementDeleteNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.delete( - resourceGroupName, - serviceName, - notificationName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const userId = "576823d0a40f7e74ec07d642"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.delete( + resourceGroupName, + serviceName, + notificationName, + userId + ); + console.log(result); } async function main() { - apiManagementDeleteNotificationRecipientUser(); + apiManagementDeleteNotificationRecipientUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts index 896b3fa1229d..f2e06208652b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientUsers.json */ async function apiManagementListNotificationRecipientUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - notificationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const notificationName = "RequestPublisherNotificationMessage"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.listByNotification( + resourceGroupName, + serviceName, + notificationName + ); + console.log(result); } async function main() { - apiManagementListNotificationRecipientUsers(); + apiManagementListNotificationRecipientUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts index d3b7b73512a3..dfd42088f4be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OpenidConnectProviderContract, - ApiManagementClient + ApiManagementClient, + OpenidConnectProviderContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the OpenID Connect Provider. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json */ async function apiManagementCreateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const parameters: OpenidConnectProviderContract = { - clientId: "oidprovidertemplate3", - clientSecret: "x", - displayName: "templateoidprovider3", - metadataEndpoint: "https://oidprovider-template3.net", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.createOrUpdate( - resourceGroupName, - serviceName, - opid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect3"; + const parameters: OpenidConnectProviderContract = { + clientId: "oidprovidertemplate3", + clientSecret: "x", + displayName: "templateoidprovider3", + metadataEndpoint: "https://oidprovider-template3.net", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.createOrUpdate( + resourceGroupName, + serviceName, + opid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateOpenIdConnectProvider(); + apiManagementCreateOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts index 851ef6e96bae..682318708865 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json */ async function apiManagementDeleteOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.delete( - resourceGroupName, - serviceName, - opid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.delete( + resourceGroupName, + serviceName, + opid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteOpenIdConnectProvider(); + apiManagementDeleteOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts index 3fad780de809..cd4c39000143 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json */ async function apiManagementHeadOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.getEntityTag( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.getEntityTag( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementHeadOpenIdConnectProvider(); + apiManagementHeadOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts index d5b66b9273cf..0661b2eb43bb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json */ async function apiManagementGetOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.get( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.get( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementGetOpenIdConnectProvider(); + apiManagementGetOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts index 12ffc8b82acb..97147ee4145d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists of all the OpenId Connect Providers. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOpenIdConnectProviders.json */ async function apiManagementListOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.openIdConnectProvider.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.openIdConnectProvider.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOpenIdConnectProviders(); + apiManagementListOpenIdConnectProviders(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts index d95e052fdf92..b2528e2925b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json */ async function apiManagementOpenidConnectProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.listSecrets( - resourceGroupName, - serviceName, - opid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.listSecrets( + resourceGroupName, + serviceName, + opid + ); + console.log(result); } async function main() { - apiManagementOpenidConnectProviderListSecrets(); + apiManagementOpenidConnectProviderListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts index fd234805fd9b..e22cc390e0fc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OpenidConnectProviderUpdateContract, - ApiManagementClient + ApiManagementClient, + OpenidConnectProviderUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific OpenID Connect Provider. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json */ async function apiManagementUpdateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const ifMatch = "*"; - const parameters: OpenidConnectProviderUpdateContract = { - clientSecret: "updatedsecret", - useInApiDocumentation: true, - useInTestConsole: false - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.update( - resourceGroupName, - serviceName, - opid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const opid = "templateOpenIdConnect2"; + const ifMatch = "*"; + const parameters: OpenidConnectProviderUpdateContract = { + clientSecret: "updatedsecret", + useInApiDocumentation: true, + useInTestConsole: false + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.update( + resourceGroupName, + serviceName, + opid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateOpenIdConnectProvider(); + apiManagementUpdateOpenIdConnectProvider(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts index dc1f21a02321..00a4c1fb98d4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of operations associated with tags. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationsByTags.json */ async function apiManagementListApiOperationsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operationOperations.listByTags( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operationOperations.listByTags( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperationsByTags(); + apiManagementListApiOperationsByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts index 7898f0ffe380..4fa310ba6646 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json */ async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.outboundNetworkDependenciesEndpoints.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.outboundNetworkDependenciesEndpoints.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); + apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts index 76d71f8fae04..86432bf43022 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ConnectivityCheckRequest, - ApiManagementClient + ApiManagementClient, + ConnectivityCheckRequest } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json */ async function httpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "https://microsoft.com", port: 3306 }, - protocolConfiguration: { - httpConfiguration: { - method: "GET", - headers: [{ name: "Authorization", value: "******" }], - validStatusCodes: [200, 204] - } - }, - source: { region: "northeurope" }, - protocol: "HTTPS" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const connectivityCheckRequestParams: ConnectivityCheckRequest = { + destination: { address: "https://microsoft.com", port: 3306 }, + protocolConfiguration: { + httpConfiguration: { + method: "GET", + headers: [{ name: "Authorization", value: "******" }], + validStatusCodes: [200, 204] + } + }, + source: { region: "northeurope" }, + protocol: "HTTPS" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName, + serviceName, + connectivityCheckRequestParams + ); + console.log(result); } /** @@ -58,29 +56,29 @@ async function httpConnectivityCheck() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheck.json */ async function tcpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "8.8.8.8", port: 53 }, - preferredIPVersion: "IPv4", - source: { region: "northeurope" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const connectivityCheckRequestParams: ConnectivityCheckRequest = { + destination: { address: "8.8.8.8", port: 53 }, + preferredIPVersion: "IPv4", + source: { region: "northeurope" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName, + serviceName, + connectivityCheckRequestParams + ); + console.log(result); } async function main() { - httpConnectivityCheck(); - tcpConnectivityCheck(); + httpConnectivityCheck(); + tcpConnectivityCheck(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts index f625c32d2ff8..7b3a61be14a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json */ async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - "\r\n \r\n \r\n \r\n \r\n \r\n" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.createOrUpdate( - resourceGroupName, - serviceName, - policyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const parameters: PolicyContract = { + format: "xml", + value: + "\r\n \r\n \r\n \r\n \r\n \r\n" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.createOrUpdate( + resourceGroupName, + serviceName, + policyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePolicy(); + apiManagementCreatePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts index 69985f3c563d..f79c89ab0bee 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicy.json */ async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.delete( - resourceGroupName, - serviceName, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.delete( + resourceGroupName, + serviceName, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeletePolicy(); + apiManagementDeletePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts index 4ae78b0f8e5b..674f904f93d9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyDescriptionListByServiceOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyDescriptionListByServiceOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all policy descriptions. @@ -24,25 +22,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyDescriptions.json */ async function apiManagementListPolicyDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const scope = "Api"; - const options: PolicyDescriptionListByServiceOptionalParams = { scope }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyDescription.listByService( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const scope = "Api"; + const options: PolicyDescriptionListByServiceOptionalParams = { scope }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyDescription.listByService( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementListPolicyDescriptions(); + apiManagementListPolicyDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts index d703b1724e37..abf8dbcf25bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyFragmentContract, - ApiManagementClient + ApiManagementClient, + PolicyFragmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a policy fragment. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json */ async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - id, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const parameters: PolicyFragmentContract = { + format: "xml", + description: "A policy fragment example", + value: + '' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + id, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePolicy(); + apiManagementCreatePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts index 8f6a6cdd6606..362cd6601fcb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a policy fragment. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicyFragment.json */ async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.delete( - resourceGroupName, - serviceName, - id, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.delete( + resourceGroupName, + serviceName, + id, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeletePolicy(); + apiManagementDeletePolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts index cdc2c3e3c213..50e58078467d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicyFragment.json */ async function apiManagementHeadPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.getEntityTag( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.getEntityTag( + resourceGroupName, + serviceName, + id + ); + console.log(result); } async function main() { - apiManagementHeadPolicyFragment(); + apiManagementHeadPolicyFragment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts index 19083d34fdcc..dd2d30cbc7ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyFragmentGetOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyFragmentGetOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a policy fragment. @@ -24,20 +22,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json */ async function apiManagementGetPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get( + resourceGroupName, + serviceName, + id + ); + console.log(result); } /** @@ -47,28 +45,28 @@ async function apiManagementGetPolicyFragment() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json */ async function apiManagementGetPolicyFragmentFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: PolicyFragmentGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const format = "rawxml"; + const options: PolicyFragmentGetOptionalParams = { format }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get( + resourceGroupName, + serviceName, + id, + options + ); + console.log(result); } async function main() { - apiManagementGetPolicyFragment(); - apiManagementGetPolicyFragmentFormat(); + apiManagementGetPolicyFragment(); + apiManagementGetPolicyFragmentFormat(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts index 353baac0c7c2..b5461cfcdf16 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all policy fragments. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragments.json */ async function apiManagementListPolicyFragments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPolicyFragments(); + apiManagementListPolicyFragments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts index 2915136023ac..b3098acf63fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists policy resources that reference the policy fragment. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragmentReferences.json */ async function apiManagementListPolicyFragmentReferences() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listReferences( - resourceGroupName, - serviceName, - id - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const id = "policyFragment1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listReferences( + resourceGroupName, + serviceName, + id + ); + console.log(result); } async function main() { - apiManagementListPolicyFragmentReferences(); + apiManagementListPolicyFragmentReferences(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts index 9db6f475ac6c..b9741d434253 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicy.json */ async function apiManagementHeadPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.getEntityTag( - resourceGroupName, - serviceName, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.getEntityTag( + resourceGroupName, + serviceName, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadPolicy(); + apiManagementHeadPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts index 7d7a1ace58ce..86ca99661b65 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyGetOptionalParams, - ApiManagementClient + ApiManagementClient, + PolicyGetOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Global policy definition of the Api Management service. @@ -24,20 +22,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json */ async function apiManagementGetPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get( + resourceGroupName, + serviceName, + policyId + ); + console.log(result); } /** @@ -47,28 +45,28 @@ async function apiManagementGetPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json */ async function apiManagementGetPolicyFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const format = "rawxml"; - const options: PolicyGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const policyId = "policy"; + const format = "rawxml"; + const options: PolicyGetOptionalParams = { format }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get( + resourceGroupName, + serviceName, + policyId, + options + ); + console.log(result); } async function main() { - apiManagementGetPolicy(); - apiManagementGetPolicyFormat(); + apiManagementGetPolicy(); + apiManagementGetPolicyFormat(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts index 8d8b7608c482..3c8c39bdedbb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicies.json */ async function apiManagementListPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPolicies(); + apiManagementListPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts index 4f96bd2686ef..098fdc1abbe6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalConfigContract, - ApiManagementClient + ApiManagementClient, + PortalConfigContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the developer portal configuration. @@ -24,49 +22,49 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalConfig.json */ async function apiManagementCreatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"] - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions." - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.createOrUpdate( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const ifMatch = "*"; + const parameters: PortalConfigContract = { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"] + }, + delegation: { + delegateRegistration: false, + delegateSubscription: false, + delegationUrl: undefined, + validationKey: undefined + }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions." + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.createOrUpdate( + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePortalConfig(); + apiManagementCreatePortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts index ce2436ba1b65..80faeb2f4d8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalConfig.json */ async function apiManagementHeadPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.getEntityTag( - resourceGroupName, - serviceName, - portalConfigId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.getEntityTag( + resourceGroupName, + serviceName, + portalConfigId + ); + console.log(result); } async function main() { - apiManagementHeadPortalConfig(); + apiManagementHeadPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts index 5463fc5e330b..1df7b9c62951 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the developer portal configuration. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json */ async function apiManagementPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.get( - resourceGroupName, - serviceName, - portalConfigId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.get( + resourceGroupName, + serviceName, + portalConfigId + ); + console.log(result); } async function main() { - apiManagementPortalConfig(); + apiManagementPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts index 39148724a093..198e5c5922e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal configurations. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalConfig.json */ async function apiManagementListPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPortalConfig(); + apiManagementListPortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts index f46de1dcd5d3..f2f6a967d6cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalConfigContract, - ApiManagementClient + ApiManagementClient, + PortalConfigContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the developer portal configuration. @@ -24,49 +22,49 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalConfig.json */ async function apiManagementUpdatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"] - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions." - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.update( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalConfigId = "default"; + const ifMatch = "*"; + const parameters: PortalConfigContract = { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"] + }, + delegation: { + delegateRegistration: false, + delegateSubscription: false, + delegationUrl: undefined, + validationKey: undefined + }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions." + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.update( + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdatePortalConfig(); + apiManagementUpdatePortalConfig(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts index 0246e008cac5..0f16bacfedfd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalRevisionContract, - ApiManagementClient + ApiManagementClient, + PortalRevisionContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalRevision.json */ async function apiManagementCreatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const parameters: PortalRevisionContract = { - description: "portal revision 1", - isCurrent: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const parameters: PortalRevisionContract = { + description: "portal revision 1", + isCurrent: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + portalRevisionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreatePortalRevision(); + apiManagementCreatePortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts index c731ded35a84..59dc37fe2138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal revision specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalRevision.json */ async function apiManagementHeadPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.getEntityTag( - resourceGroupName, - serviceName, - portalRevisionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.getEntityTag( + resourceGroupName, + serviceName, + portalRevisionId + ); + console.log(result); } async function main() { - apiManagementHeadPortalRevision(); + apiManagementHeadPortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts index 90ec6a242e8a..a90256803ed9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json */ async function apiManagementGetPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.get( - resourceGroupName, - serviceName, - portalRevisionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.get( + resourceGroupName, + serviceName, + portalRevisionId + ); + console.log(result); } async function main() { - apiManagementGetPortalRevision(); + apiManagementGetPortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts index 8cf1e88339e6..53bc30849e42 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's revisions. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalRevisions.json */ async function apiManagementListPortalRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.portalRevision.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.portalRevision.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListPortalRevisions(); + apiManagementListPortalRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts index 7e31dbff5bdf..9a58667c8a85 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalRevisionContract, - ApiManagementClient + ApiManagementClient, + PortalRevisionContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the description of specified portal revision or makes it current. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalRevision.json */ async function apiManagementUpdatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const ifMatch = "*"; - const parameters: PortalRevisionContract = { - description: "portal revision update", - isCurrent: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const portalRevisionId = "20201112101010"; + const ifMatch = "*"; + const parameters: PortalRevisionContract = { + description: "portal revision update", + isCurrent: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.beginUpdateAndWait( + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdatePortalRevision(); + apiManagementUpdatePortalRevision(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts index b16d6107ba68..681faa397c26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalSettings.json */ async function apiManagementListPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalSettings.listByService( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalSettings.listByService( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPortalSettings(); + apiManagementListPortalSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts index 808909204a6f..38bd884dd0f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PrivateEndpointConnectionRequest, - ApiManagementClient + ApiManagementClient, + PrivateEndpointConnectionRequest } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json */ async function apiManagementApproveOrRejectPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", - properties: { - privateLinkServiceConnectionState: { - description: "The Private Endpoint Connection is approved.", - status: "Approved" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { + id: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + properties: { + privateLinkServiceConnectionState: { + description: "The Private Endpoint Connection is approved.", + status: "Approved" + } + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest + ); + console.log(result); } async function main() { - apiManagementApproveOrRejectPrivateEndpointConnection(); + apiManagementApproveOrRejectPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts index a0cc9313d7b5..4b204b2f160e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Private Endpoint Connection. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json */ async function apiManagementDeletePrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginDeleteAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.beginDeleteAndWait( + resourceGroupName, + serviceName, + privateEndpointConnectionName + ); + console.log(result); } async function main() { - apiManagementDeletePrivateEndpointConnection(); + apiManagementDeletePrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts index ed705263e493..88bd99ce9d93 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json */ async function apiManagementGetPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getByName( - resourceGroupName, - serviceName, - privateEndpointConnectionName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateEndpointConnectionName = "privateEndpointConnectionName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.getByName( + resourceGroupName, + serviceName, + privateEndpointConnectionName + ); + console.log(result); } async function main() { - apiManagementGetPrivateEndpointConnection(); + apiManagementGetPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts index 10b6a4e2a268..dab9b8911de2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json */ async function apiManagementGetPrivateLinkGroupResource() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateLinkSubResourceName = "privateLinkSubResourceName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getPrivateLinkResource( - resourceGroupName, - serviceName, - privateLinkSubResourceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const privateLinkSubResourceName = "privateLinkSubResourceName"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.getPrivateLinkResource( + resourceGroupName, + serviceName, + privateLinkSubResourceName + ); + console.log(result); } async function main() { - apiManagementGetPrivateLinkGroupResource(); + apiManagementGetPrivateLinkGroupResource(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts index 6527fddd32b9..6af25d653f5b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateEndpointConnections.json */ async function apiManagementListPrivateEndpointConnections() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateEndpointConnectionOperations.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.privateEndpointConnectionOperations.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListPrivateEndpointConnections(); + apiManagementListPrivateEndpointConnections(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts index 50bed1bc390c..cf5baff8dade 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateLinkGroupResources.json */ async function apiManagementListPrivateLinkGroupResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listPrivateLinkResources( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnectionOperations.listPrivateLinkResources( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementListPrivateLinkGroupResources(); + apiManagementListPrivateLinkGroupResources(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts index 7e70371099cc..f7fbe62c05dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductApi.json */ async function apiManagementHeadProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const apiId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.checkEntityExists( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const apiId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.checkEntityExists( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadProductApi(); + apiManagementHeadProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts index 9e15389960c7..f08981649173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductApi.json */ async function apiManagementCreateProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.createOrUpdate( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementCreateProductApi(); + apiManagementCreateProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts index d404bc767db3..d1e7d0f043f2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductApi.json */ async function apiManagementDeleteProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.delete( - resourceGroupName, - serviceName, - productId, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.delete( + resourceGroupName, + serviceName, + productId, + apiId + ); + console.log(result); } async function main() { - apiManagementDeleteProductApi(); + apiManagementDeleteProductApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts index 53b66522bb8d..97a7b993d77a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductApis.json */ async function apiManagementListProductApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5768181ea40f7eb6c49f6ac7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productApi.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5768181ea40f7eb6c49f6ac7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productApi.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductApis(); + apiManagementListProductApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts index 6232d0b6ba2c..b04cd27d92ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, ProductContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProduct.json */ async function apiManagementCreateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const parameters: ProductContract = { + displayName: "Test Template ProductName 4" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.createOrUpdate( + resourceGroupName, + serviceName, + productId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProduct(); + apiManagementCreateProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts index 241c237c9a47..43f4cf001843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ProductDeleteOptionalParams, - ApiManagementClient + ApiManagementClient, + ProductDeleteOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete product. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProduct.json */ async function apiManagementDeleteProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: ProductDeleteOptionalParams = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const ifMatch = "*"; + const deleteSubscriptions = true; + const options: ProductDeleteOptionalParams = { deleteSubscriptions }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.delete( + resourceGroupName, + serviceName, + productId, + ifMatch, + options + ); + console.log(result); } async function main() { - apiManagementDeleteProduct(); + apiManagementDeleteProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts index b615b809896e..6746d41d8989 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProduct.json */ async function apiManagementHeadProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.getEntityTag( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.getEntityTag( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementHeadProduct(); + apiManagementHeadProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts index 4ec43bce9e7b..08e184238869 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json */ async function apiManagementGetProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.get( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.get( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementGetProduct(); + apiManagementGetProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts index 16437f00cc40..e9f142355267 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductGroup.json */ async function apiManagementHeadProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.checkEntityExists( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const groupId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.checkEntityExists( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementHeadProductGroup(); + apiManagementHeadProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts index 5ddd2bd110d7..bc456ae547bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the association between the specified developer group with the specified product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductGroup.json */ async function apiManagementCreateProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const groupId = "templateGroup"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.createOrUpdate( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementCreateProductGroup(); + apiManagementCreateProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts index 94c45c59a732..a225ef93ec37 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association between the specified group and product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductGroup.json */ async function apiManagementDeleteProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.delete( - resourceGroupName, - serviceName, - productId, - groupId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const groupId = "templateGroup"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.delete( + resourceGroupName, + serviceName, + productId, + groupId + ); + console.log(result); } async function main() { - apiManagementDeleteProductGroup(); + apiManagementDeleteProductGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts index bc88afdb591e..1a06b83022ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductGroups.json */ async function apiManagementListProductGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productGroup.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5600b57e7e8880006a060002"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productGroup.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductGroups(); + apiManagementListProductGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts index ae381908848f..06a04a8808f1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProducts.json */ async function apiManagementListProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.product.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.product.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProducts(); + apiManagementListProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts index d8274ee2a74b..ff0076b364b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductsByTags.json */ async function apiManagementListProductsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.product.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.product.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductsByTags(); + apiManagementListProductsByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts index 0f73b1c7dec0..f54711c75dac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the Product. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json */ async function apiManagementCreateProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.createOrUpdate( - resourceGroupName, - serviceName, - productId, - policyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5702e97e5157a50f48dce801"; + const policyId = "policy"; + const parameters: PolicyContract = { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.createOrUpdate( + resourceGroupName, + serviceName, + productId, + policyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProductPolicy(); + apiManagementCreateProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts index ddd21565a8ec..d07aca9426bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductPolicy.json */ async function apiManagementDeleteProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.delete( - resourceGroupName, - serviceName, - productId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.delete( + resourceGroupName, + serviceName, + productId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteProductPolicy(); + apiManagementDeleteProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts index 583cd01a7292..4e11f550b7eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductPolicy.json */ async function apiManagementHeadProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.getEntityTag( - resourceGroupName, - serviceName, - productId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "unlimited"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.getEntityTag( + resourceGroupName, + serviceName, + productId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadProductPolicy(); + apiManagementHeadProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts index 8591ab0faa18..b5468cb8fa8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json */ async function apiManagementGetProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.get( - resourceGroupName, - serviceName, - productId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "kjoshiarmTemplateProduct4"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.get( + resourceGroupName, + serviceName, + productId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetProductPolicy(); + apiManagementGetProductPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts index 592a208c2a38..f256628caacf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductPolicies.json */ async function apiManagementListProductPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.listByProduct( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "armTemplateProduct4"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.listByProduct( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementListProductPolicies(); + apiManagementListProductPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts index 92a57cc82332..784fd76e549d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions to the specified product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductSubscriptions.json */ async function apiManagementListProductSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productSubscriptions.list( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5600b57e7e8880006a060002"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productSubscriptions.list( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductSubscriptions(); + apiManagementListProductSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts index 108231efc6eb..28d95030d0cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ProductUpdateParameters, - ApiManagementClient + ApiManagementClient, + ProductUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update existing product details. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProduct.json */ async function apiManagementUpdateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "testproduct"; + const ifMatch = "*"; + const parameters: ProductUpdateParameters = { + displayName: "Test Template ProductName 4" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.update( + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateProduct(); + apiManagementUpdateProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts index 62626d52456d..97c9228244dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductWiki.json */ async function apiManagementCreateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.createOrUpdate( + resourceGroupName, + serviceName, + productId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateProductWiki(); + apiManagementCreateProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts index c6a47ccec611..961313b9362d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from a Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductWiki.json */ async function apiManagementDeleteProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.delete( - resourceGroupName, - serviceName, - productId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.delete( + resourceGroupName, + serviceName, + productId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteProductWiki(); + apiManagementDeleteProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts index a038f7af6758..472703ed2201 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductWiki.json */ async function apiManagementHeadProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.getEntityTag( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.getEntityTag( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementHeadProductWiki(); + apiManagementHeadProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts index 813b2cf26058..645be9fd1f14 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductWiki.json */ async function apiManagementGetProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.get( - resourceGroupName, - serviceName, - productId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.get( + resourceGroupName, + serviceName, + productId + ); + console.log(result); } async function main() { - apiManagementGetProductWiki(); + apiManagementGetProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts index 9b7c4f9d648f..da6915e678c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProductWiki.json */ async function apiManagementUpdateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.update( + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateProductWiki(); + apiManagementUpdateProductWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts index eae0b06af239..dbb7da3d6ca9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductWikis.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.productWikis.list( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.productWikis.list( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts index e30cd43ebd6b..7fb5f6019181 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeys.json */ async function apiManagementGetQuotaCounterKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.listByService( - resourceGroupName, - serviceName, - quotaCounterKey - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.listByService( + resourceGroupName, + serviceName, + quotaCounterKey + ); + console.log(result); } async function main() { - apiManagementGetQuotaCounterKeys(); + apiManagementGetQuotaCounterKeys(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts index 915cac0059d3..459690947e2a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - QuotaCounterValueUpdateContract, - ApiManagementClient + ApiManagementClient, + QuotaCounterValueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKey.json */ async function apiManagementUpdateQuotaCounterKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 2.5630078125 - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const parameters: QuotaCounterValueUpdateContract = { + callsCount: 0, + kbTransferred: 2.5630078125 + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.update( + resourceGroupName, + serviceName, + quotaCounterKey, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateQuotaCounterKey(); + apiManagementUpdateQuotaCounterKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts index e6c9445e5125..312297da9317 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json */ async function apiManagementGetQuotaCounterKeysByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.get( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.get( + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey + ); + console.log(result); } async function main() { - apiManagementGetQuotaCounterKeysByQuotaPeriod(); + apiManagementGetQuotaCounterKeysByQuotaPeriod(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts index 2a5951cdc029..983955d88310 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - QuotaCounterValueUpdateContract, - ApiManagementClient + ApiManagementClient, + QuotaCounterValueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json */ async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 0 - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const quotaCounterKey = "ba"; + const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; + const parameters: QuotaCounterValueUpdateContract = { + callsCount: 0, + kbTransferred: 0 + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.update( + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); + apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts index efd5680f27b7..9d3c6aea102a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all azure regions in which the service exists. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListRegions.json */ async function apiManagementListRegions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.region.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.region.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListRegions(); + apiManagementListRegions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts index 2c79ef784584..d0e598c4b9eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByApi.json */ async function apiManagementGetReportsByApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByApi( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByApi( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByApi(); + apiManagementGetReportsByApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts index 09abd47808a9..f5cbcd543793 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by geography. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByGeo.json */ async function apiManagementGetReportsByGeo() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByGeo( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByGeo( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByGeo(); + apiManagementGetReportsByGeo(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts index cf11ce2a1a6d..e20e20dee361 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API Operations. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByOperation.json */ async function apiManagementGetReportsByOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByOperation( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByOperation( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByOperation(); + apiManagementGetReportsByOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts index ba62392350d4..2ab51f424d6c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Product. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByProduct.json */ async function apiManagementGetReportsByProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByProduct( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByProduct( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByProduct(); + apiManagementGetReportsByProduct(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts index 1e164289dd9c..4acb17e29dc9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Request. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByRequest.json */ async function apiManagementGetReportsByRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByRequest( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByRequest( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByRequest(); + apiManagementGetReportsByRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts index 6de51ec97e0f..b5846c1f4c82 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by subscription. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsBySubscription.json */ async function apiManagementGetReportsBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listBySubscription( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listBySubscription( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsBySubscription(); + apiManagementGetReportsBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts index 181ea10ce899..3a26df04327b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Time. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByTime.json */ async function apiManagementGetReportsByTime() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const interval = "PT15M"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByTime( - resourceGroupName, - serviceName, - filter, - interval - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const interval = "PT15M"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByTime( + resourceGroupName, + serviceName, + filter, + interval + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByTime(); + apiManagementGetReportsByTime(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts index 4291513d0653..6311abbe2c75 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by User. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByUser.json */ async function apiManagementGetReportsByUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.reports.listByUser( - resourceGroupName, - serviceName, - filter - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const filter = + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.reports.listByUser( + resourceGroupName, + serviceName, + filter + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementGetReportsByUser(); + apiManagementGetReportsByUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts index f266ccfc4c65..04e38c0908fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSigninSettings, - SignInSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-In settings. @@ -25,27 +23,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignIn.json */ async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSigninSettings = { enabled: true }; + const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignIn(); + apiManagementPortalSettingsUpdateSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts index 2c52470d5ce3..da6b00504df6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignInSettings.json */ async function apiManagementHeadSignInSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadSignInSettings(); + apiManagementHeadSignInSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts index 28f28743a6c1..3de888ce280e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign In Settings for the Portal @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignIn.json */ async function apiManagementPortalSettingsGetSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetSignIn(); + apiManagementPortalSettingsGetSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts index c89f5a49379b..2009c6c7b0c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSigninSettings, - ApiManagementClient + ApiManagementClient, + PortalSigninSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-In settings. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json */ async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSigninSettings = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignIn(); + apiManagementPortalSettingsUpdateSignIn(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts index ad1197c5fffd..dcfa74188daa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSignupSettings, - SignUpSettingsCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-Up settings. @@ -25,34 +23,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignUp.json */ async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text." - } - }; - const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSignupSettings = { + enabled: true, + termsOfService: { + consentRequired: true, + enabled: true, + text: "Terms of service text." + } + }; + const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.createOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignUp(); + apiManagementPortalSettingsUpdateSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts index 9143fe8bdcf0..eae8af0dc3c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignUpSettings.json */ async function apiManagementHeadSignUpSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.getEntityTag( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.getEntityTag( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementHeadSignUpSettings(); + apiManagementHeadSignUpSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts index 319a4b7bd46f..d0c880d09b3a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign Up Settings for the Portal @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignUp.json */ async function apiManagementPortalSettingsGetSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementPortalSettingsGetSignUp(); + apiManagementPortalSettingsGetSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts index 7741a12efa7e..d34a45085089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PortalSignupSettings, - ApiManagementClient + ApiManagementClient, + PortalSignupSettings } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-Up settings. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json */ async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text." - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const ifMatch = "*"; + const parameters: PortalSignupSettings = { + enabled: true, + termsOfService: { + consentRequired: true, + enabled: true, + text: "Terms of service text." + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.update( + resourceGroupName, + serviceName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementPortalSettingsUpdateSignUp(); + apiManagementPortalSettingsUpdateSignUp(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts index 05e275c85dc4..e1377a92bd0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SubscriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + SubscriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSubscription.json */ async function apiManagementCreateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { - displayName: "testsub", - ownerId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.createOrUpdate( - resourceGroupName, - serviceName, - sid, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const parameters: SubscriptionCreateParameters = { + displayName: "testsub", + ownerId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.createOrUpdate( + resourceGroupName, + serviceName, + sid, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateSubscription(); + apiManagementCreateSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts index 67f671d3a2e2..d949a3a3bc32 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified subscription. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteSubscription.json */ async function apiManagementDeleteSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.delete( - resourceGroupName, - serviceName, - sid, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.delete( + resourceGroupName, + serviceName, + sid, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteSubscription(); + apiManagementDeleteSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts index 99b2bf3acad1..d83ba59e14c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSubscription.json */ async function apiManagementHeadSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.getEntityTag( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.getEntityTag( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementHeadSubscription(); + apiManagementHeadSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts index 59dd2b118352..98ec6daccb46 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json */ async function apiManagementGetSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.get( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.get( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementGetSubscription(); + apiManagementGetSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts index 29b594046e65..d3f7d493d476 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all subscriptions of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSubscriptions.json */ async function apiManagementListSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.subscription.list( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.subscription.list( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSubscriptions(); + apiManagementListSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts index 5965ee649a51..0b3cfa100073 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription keys. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionListSecrets.json */ async function apiManagementSubscriptionListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.listSecrets( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "5931a769d8d14f0ad8ce13b8"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.listSecrets( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionListSecrets(); + apiManagementSubscriptionListSecrets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts index 28088928c4d8..9c030fa59018 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json */ async function apiManagementSubscriptionRegeneratePrimaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.regeneratePrimaryKey( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionRegeneratePrimaryKey(); + apiManagementSubscriptionRegeneratePrimaryKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts index 575f32f09ce0..833df231056e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json */ async function apiManagementSubscriptionRegenerateSecondaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.regenerateSecondaryKey( + resourceGroupName, + serviceName, + sid + ); + console.log(result); } async function main() { - apiManagementSubscriptionRegenerateSecondaryKey(); + apiManagementSubscriptionRegenerateSecondaryKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts index dcfdc0e6e6da..84a124fd08d7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SubscriptionUpdateParameters, - ApiManagementClient + ApiManagementClient, + SubscriptionUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of a subscription specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateSubscription.json */ async function apiManagementUpdateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.update( - resourceGroupName, - serviceName, - sid, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const sid = "testsub"; + const ifMatch = "*"; + const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.update( + resourceGroupName, + serviceName, + sid, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateSubscription(); + apiManagementUpdateSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts index 52aa8cbe6993..852fd960a3c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Api. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json */ async function apiManagementCreateApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateApiTag(); + apiManagementCreateApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts index 720adf7c4489..6c45f7cf18e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json */ async function apiManagementCreateApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const operationId = "5931a75ae4bbd512a88c680a"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const operationId = "5931a75ae4bbd512a88c680a"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationTag(); + apiManagementCreateApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts index e7327d91cf64..594fafdb2b72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json */ async function apiManagementCreateProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "5931a75ae4bbd512a88c680b"; + const tagId = "tagId1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementCreateProductTag(); + apiManagementCreateProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts index 95a59272991c..65344fc9cb26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagCreateUpdateParameters, - ApiManagementClient + ApiManagementClient, + TagCreateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a tag. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTag.json */ async function apiManagementCreateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "tagId1"; + const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.createOrUpdate( + resourceGroupName, + serviceName, + tagId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTag(); + apiManagementCreateTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts index ed2af0a78357..e4e46f22bbef 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific tag of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTag.json */ async function apiManagementDeleteTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.delete( - resourceGroupName, - serviceName, - tagId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "tagId1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.delete( + resourceGroupName, + serviceName, + tagId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteTag(); + apiManagementDeleteTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts index adeb2e1c6ea6..99a0f0749817 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Api. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTag.json */ async function apiManagementDeleteApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteApiTag(); + apiManagementDeleteApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts index 55ec990815ff..4213d50306db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationTag.json */ async function apiManagementDeleteApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const operationId = "59d5b28d1f7fab116c282651"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const operationId = "59d5b28d1f7fab116c282651"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationTag(); + apiManagementDeleteApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts index cc92c57bdf3b..351d5ea1bb2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductTag.json */ async function apiManagementDeleteProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59d5b28d1f7fab116c282650"; + const tagId = "59d5b28e1f7fab116402044e"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.detachFromProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementDeleteProductTag(); + apiManagementDeleteProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts index e1f4ad9b464f..032d15abdb67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json */ async function apiManagementGetApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetApiTag(); + apiManagementGetApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts index b500b22c44c0..aa39c7978abb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Operation. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json */ async function apiManagementGetApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const operationId = "59d6bb8f1f7fab13dc67ec9a"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationTag(); + apiManagementGetApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts index ed0443df7ae3..52e2a6a6b244 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Product. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json */ async function apiManagementGetProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementGetProductTag(); + apiManagementGetProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts index f412d5d3df32..91a60e7e4977 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTag.json */ async function apiManagementHeadApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByApi( - resourceGroupName, - serviceName, - apiId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByApi( + resourceGroupName, + serviceName, + apiId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadApiTag(); + apiManagementHeadApiTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts index d6d7ecab6aee..f967bec8eaca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationTag.json */ async function apiManagementHeadApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const operationId = "59d6bb8f1f7fab13dc67ec9a"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationTag(); + apiManagementHeadApiOperationTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts index b411670bbc87..4ad25b94901c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductTag.json */ async function apiManagementHeadProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59306a29e4bbd510dc24e5f8"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByProduct( - resourceGroupName, - serviceName, - productId, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "59306a29e4bbd510dc24e5f8"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityStateByProduct( + resourceGroupName, + serviceName, + productId, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadProductTag(); + apiManagementHeadProductTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts index efab0cd07fa9..71592f6c5204 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTag.json */ async function apiManagementHeadTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityState( - resourceGroupName, - serviceName, - tagId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getEntityState( + resourceGroupName, + serviceName, + tagId + ); + console.log(result); } async function main() { - apiManagementHeadTag(); + apiManagementHeadTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts index a76bd73c4d04..abc604ef9ae3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the tag specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json */ async function apiManagementGetTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.get(resourceGroupName, serviceName, tagId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.get(resourceGroupName, serviceName, tagId); + console.log(result); } async function main() { - apiManagementGetTag(); + apiManagementGetTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts index d602d51dfd99..609d64d32ac0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTags.json */ async function apiManagementListApiTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTags(); + apiManagementListApiTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts index d5314d8a8c8e..6e14150696fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Operation. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationTags.json */ async function apiManagementListApiOperationTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0888cba3f6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0888cba3f6"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperationTags(); + apiManagementListApiOperationTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts index e5f974185617..724f69ac8865 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Product. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductTags.json */ async function apiManagementListProductTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d2ef278aa04f0888cba3f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByProduct( - resourceGroupName, - serviceName, - productId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const productId = "57d2ef278aa04f0888cba3f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByProduct( + resourceGroupName, + serviceName, + productId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListProductTags(); + apiManagementListProductTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts index 1590eb84e906..fa345f2d5bc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of tags defined within a service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTags.json */ async function apiManagementListTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tag.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tag.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTags(); + apiManagementListTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts index 7e4fdbdb908a..5d696438034b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of resources associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTagResources.json */ async function apiManagementListTagResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tagResource.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tagResource.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTagResources(); + apiManagementListTagResources(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts index c9cf0351412d..4e044c92d442 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagCreateUpdateParameters, - ApiManagementClient + ApiManagementClient, + TagCreateUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the tag specified by its identifier. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTag.json */ async function apiManagementUpdateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.update( - resourceGroupName, - serviceName, - tagId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const tagId = "temptag"; + const ifMatch = "*"; + const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.update( + resourceGroupName, + serviceName, + tagId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTag(); + apiManagementUpdateTag(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts index 5980978da091..a62743907745 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AccessInformationCreateParameters, - ApiManagementClient + AccessInformationCreateParameters, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTenantAccess.json */ async function apiManagementCreateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationCreateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.create( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const ifMatch = "*"; + const parameters: AccessInformationCreateParameters = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.create( + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateTenantAccess(); + apiManagementCreateTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts index 4ad470bacf74..3076be123026 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Tenant access metadata @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTenantAccess.json */ async function apiManagementHeadTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.getEntityTag( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.getEntityTag( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementHeadTenantAccess(); + apiManagementHeadTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts index 89a00b00a34c..bd58c0f7dc7d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details without secrets. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json */ async function apiManagementGetTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } /** @@ -44,25 +42,25 @@ async function apiManagementGetTenantAccess() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json */ async function apiManagementGetTenantGitAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "gitAccess"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "gitAccess"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementGetTenantAccess(); - apiManagementGetTenantGitAccess(); + apiManagementGetTenantAccess(); + apiManagementGetTenantGitAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts index b0ebbca83394..3704f35af038 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key for GIT. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccessGit.regeneratePrimaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts index 237541c234c1..fa87c05fe262 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key for GIT. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccessGit.regenerateSecondaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts index b639a89e236d..3851da486a0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantAccess.json */ async function apiManagementListTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantAccess.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tenantAccess.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTenantAccess(); + apiManagementListTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts index 084ace7979c0..60d9eb7902c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsTenantAccess.json */ async function apiManagementListSecretsTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.listSecrets( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.listSecrets( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementListSecretsTenantAccess(); + apiManagementListSecretsTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts index ba54ff5d6c7f..56d976c279da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.regeneratePrimaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts index 5bf80798e4e1..9c6294e1b4a4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json */ async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.regenerateSecondaryKey( + resourceGroupName, + serviceName, + accessName + ); + console.log(result); } async function main() { - apiManagementTenantAccessRegenerateKey(); + apiManagementTenantAccessRegenerateKey(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts index 0a45399af35d..38ec405587f3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AccessInformationUpdateParameters, - ApiManagementClient + AccessInformationUpdateParameters, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. @@ -24,28 +22,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTenantAccess.json */ async function apiManagementUpdateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationUpdateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.update( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const accessName = "access"; + const ifMatch = "*"; + const parameters: AccessInformationUpdateParameters = { enabled: true }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.update( + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateTenantAccess(); + apiManagementUpdateTenantAccess(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts index 30a6f486f333..1fe3ebb45959 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DeployConfigurationParameters, - ApiManagementClient + ApiManagementClient, + DeployConfigurationParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationDeploy.json */ async function apiManagementTenantConfigurationDeploy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginDeployAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: DeployConfigurationParameters = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginDeployAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationDeploy(); + apiManagementTenantConfigurationDeploy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts index 183413c070e7..b307c0a9d642 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessSyncState.json */ async function apiManagementTenantAccessSyncState() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.getSyncState( - resourceGroupName, - serviceName, - configurationName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.getSyncState( + resourceGroupName, + serviceName, + configurationName + ); + console.log(result); } async function main() { - apiManagementTenantAccessSyncState(); + apiManagementTenantAccessSyncState(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts index 339b7d8e350b..bc78d11946bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - SaveConfigurationParameter, - ApiManagementClient + ApiManagementClient, + SaveConfigurationParameter } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationSave.json */ async function apiManagementTenantConfigurationSave() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: SaveConfigurationParameter = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginSaveAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: SaveConfigurationParameter = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginSaveAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationSave(); + apiManagementTenantConfigurationSave(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts index 593245c52c97..78f312d6617d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DeployConfigurationParameters, - ApiManagementClient + ApiManagementClient, + DeployConfigurationParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationValidate.json */ async function apiManagementTenantConfigurationValidate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginValidateAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const configurationName = "configuration"; + const parameters: DeployConfigurationParameters = { branch: "master" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.beginValidateAndWait( + resourceGroupName, + serviceName, + configurationName, + parameters + ); + console.log(result); } async function main() { - apiManagementTenantConfigurationValidate(); + apiManagementTenantConfigurationValidate(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts index 62f39d5d4132..dcf2b013c5a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant settings. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json */ async function apiManagementGetTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const settingsType = "public"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantSettings.get( - resourceGroupName, - serviceName, - settingsType - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const settingsType = "public"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantSettings.get( + resourceGroupName, + serviceName, + settingsType + ); + console.log(result); } async function main() { - apiManagementGetTenantSettings(); + apiManagementGetTenantSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts index bee5b4a6d6fd..bd1370baed7e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Public settings. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantSettings.json */ async function apiManagementListTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantSettings.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.tenantSettings.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListTenantSettings(); + apiManagementListTenantSettings(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts index fbab7fc3a2cb..24c9757e7a4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Sends confirmation @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserConfirmationPasswordSend.json */ async function apiManagementUserConfirmationPasswordSend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userConfirmationPassword.send( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57127d485157a511ace86ae7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userConfirmationPassword.send( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementUserConfirmationPasswordSend(); + apiManagementUserConfirmationPasswordSend(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts index f21acf2952a6..ad8367f5294e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserCreateParameters, - ApiManagementClient + ApiManagementClient, + UserCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a user. @@ -24,31 +22,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateUser.json */ async function apiManagementCreateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const parameters: UserCreateParameters = { - confirmation: "signup", - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.createOrUpdate( - resourceGroupName, - serviceName, - userId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512288c680b"; + const parameters: UserCreateParameters = { + confirmation: "signup", + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.createOrUpdate( + resourceGroupName, + serviceName, + userId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateUser(); + apiManagementCreateUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts index b07039d2c5ab..e7716f68fac4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific user. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteUser.json */ async function apiManagementDeleteUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.delete( - resourceGroupName, - serviceName, - userId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512288c680b"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.delete( + resourceGroupName, + serviceName, + userId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteUser(); + apiManagementDeleteUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts index f1e39fe5ea16..ed1cef401bdc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserGenerateSsoUrl.json */ async function apiManagementUserGenerateSsoUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.generateSsoUrl( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57127d485157a511ace86ae7"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.generateSsoUrl( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementUserGenerateSsoUrl(); + apiManagementUserGenerateSsoUrl(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts index a8d971057e1e..2e195ef7229e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadUser.json */ async function apiManagementHeadUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getEntityTag( - resourceGroupName, - serviceName, - userId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getEntityTag( + resourceGroupName, + serviceName, + userId + ); + console.log(result); } async function main() { - apiManagementHeadUser(); + apiManagementHeadUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts index af21ca84b0c8..b1e1afda4b3d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the user specified by its identifier. @@ -21,20 +19,20 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json */ async function apiManagementGetUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.get(resourceGroupName, serviceName, userId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.get(resourceGroupName, serviceName, userId); + console.log(result); } async function main() { - apiManagementGetUser(); + apiManagementGetUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts index dae88fd58203..433daa3e6b32 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserTokenParameters, - ApiManagementClient + ApiManagementClient, + UserTokenParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. @@ -24,29 +22,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserToken.json */ async function apiManagementUserToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "userId1718"; - const parameters: UserTokenParameters = { - expiry: new Date("2019-04-21T00:44:24.2845269Z"), - keyType: "primary" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getSharedAccessToken( - resourceGroupName, - serviceName, - userId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "userId1718"; + const parameters: UserTokenParameters = { + expiry: new Date("2019-04-21T00:44:24.2845269Z"), + keyType: "primary" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getSharedAccessToken( + resourceGroupName, + serviceName, + userId, + parameters + ); + console.log(result); } async function main() { - apiManagementUserToken(); + apiManagementUserToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts index 633fea2229a3..c46113c78d7b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all user groups. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserGroups.json */ async function apiManagementListUserGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userGroup.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57681833a40f7eb6c49f6acf"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userGroup.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserGroups(); + apiManagementListUserGroups(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts index 0e7f010d6fcf..5c078c68b991 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of all user identities. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserIdentities.json */ async function apiManagementListUserIdentities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57f2af53bb17172280f44057"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userIdentities.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57f2af53bb17172280f44057"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userIdentities.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserIdentities(); + apiManagementListUserIdentities(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts index b212a1781a0b..cda945594de8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of registered users in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUsers.json */ async function apiManagementListUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.user.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.user.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUsers(); + apiManagementListUsers(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts index d64b3f87dfc2..ad802c7097fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json */ async function apiManagementGetUserSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "1"; - const sid = "5fa9b096f3df14003c070001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userSubscription.get( - resourceGroupName, - serviceName, - userId, - sid - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "1"; + const sid = "5fa9b096f3df14003c070001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userSubscription.get( + resourceGroupName, + serviceName, + userId, + sid + ); + console.log(result); } async function main() { - apiManagementGetUserSubscription(); + apiManagementGetUserSubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts index 47fe92e03081..7d554166fb28 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions of the specified user. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserSubscriptions.json */ async function apiManagementListUserSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.userSubscription.list( - resourceGroupName, - serviceName, - userId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "57681833a40f7eb6c49f6acf"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.userSubscription.list( + resourceGroupName, + serviceName, + userId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListUserSubscriptions(); + apiManagementListUserSubscriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts index 17b2ed83fcea..a8bb1143bce1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - UserUpdateParameters, - ApiManagementClient + ApiManagementClient, + UserUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the user specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateUser.json */ async function apiManagementUpdateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const ifMatch = "*"; - const parameters: UserUpdateParameters = { - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.update( - resourceGroupName, - serviceName, - userId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const userId = "5931a75ae4bbd512a88c680b"; + const ifMatch = "*"; + const parameters: UserUpdateParameters = { + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.update( + resourceGroupName, + serviceName, + userId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateUser(); + apiManagementUpdateUser(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts index c925ab438886..ecc4eb4dabc3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiCreateOrUpdateParameter, - ApiManagementClient + ApiCreateOrUpdateParameter, + ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json */ async function apiManagementCreateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" - } - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + } + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -62,32 +60,32 @@ async function apiManagementCreateApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json */ async function apiManagementCreateApiClone() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api2"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -97,36 +95,36 @@ async function apiManagementCreateApiClone() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json */ async function apiManagementCreateApiNewVersionUsingExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echoapiv3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -136,28 +134,28 @@ async function apiManagementCreateApiNewVersionUsingExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json */ async function apiManagementCreateApiRevisionFromExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const parameters: ApiCreateOrUpdateParameter = { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -167,27 +165,27 @@ async function apiManagementCreateApiRevisionFromExistingApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json */ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "apidocs"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -197,27 +195,27 @@ async function apiManagementCreateApiUsingImportOverrideServiceUrl() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json */ async function apiManagementCreateApiUsingOai3Import() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -227,28 +225,28 @@ async function apiManagementCreateApiUsingOai3Import() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json */ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -258,26 +256,26 @@ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryPa * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json */ async function apiManagementCreateApiUsingSwaggerImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -287,27 +285,27 @@ async function apiManagementCreateApiUsingSwaggerImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json */ async function apiManagementCreateApiUsingWadlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "petstore"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -317,41 +315,41 @@ async function apiManagementCreateApiUsingWadlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json */ async function apiManagementCreateApiWithMultipleAuthServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { + authorizationServerId: "authorizationServerId2283", + scope: "oauth2scope2580" + }, + { + authorizationServerId: "authorizationServerId2284", + scope: "oauth2scope2581" + } + ] }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -361,41 +359,41 @@ async function apiManagementCreateApiWithMultipleAuthServers() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json */ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283" + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283" + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284" + } + ] }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284" - } - ] - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -405,39 +403,39 @@ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json */ async function apiManagementCreateApiWithOpenIdConnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid" - } - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid" + } + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -447,29 +445,29 @@ async function apiManagementCreateApiWithOpenIdConnect() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json */ async function apiManagementCreateGraphQlApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -479,31 +477,31 @@ async function apiManagementCreateGraphQlApi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json */ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -513,30 +511,30 @@ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json */ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "soapApi"; + const parameters: ApiCreateOrUpdateParameter = { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } /** @@ -546,48 +544,48 @@ async function apiManagementCreateSoapToRestApiUsingWsdlImport() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json */ async function apiManagementCreateWebSocketApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "tempgroup"; + const parameters: ApiCreateOrUpdateParameter = { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApi(); - apiManagementCreateApiClone(); - apiManagementCreateApiNewVersionUsingExistingApi(); - apiManagementCreateApiRevisionFromExistingApi(); - apiManagementCreateApiUsingImportOverrideServiceUrl(); - apiManagementCreateApiUsingOai3Import(); - apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - apiManagementCreateApiUsingSwaggerImport(); - apiManagementCreateApiUsingWadlImport(); - apiManagementCreateApiWithMultipleAuthServers(); - apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - apiManagementCreateApiWithOpenIdConnect(); - apiManagementCreateGraphQlApi(); - apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - apiManagementCreateSoapToRestApiUsingWsdlImport(); - apiManagementCreateWebSocketApi(); + apiManagementCreateApi(); + apiManagementCreateApiClone(); + apiManagementCreateApiNewVersionUsingExistingApi(); + apiManagementCreateApiRevisionFromExistingApi(); + apiManagementCreateApiUsingImportOverrideServiceUrl(); + apiManagementCreateApiUsingOai3Import(); + apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + apiManagementCreateApiUsingSwaggerImport(); + apiManagementCreateApiUsingWadlImport(); + apiManagementCreateApiWithMultipleAuthServers(); + apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + apiManagementCreateApiWithOpenIdConnect(); + apiManagementCreateGraphQlApi(); + apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + apiManagementCreateSoapToRestApiUsingWsdlImport(); + apiManagementCreateWebSocketApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts index bce9734c0807..06ddce3a973e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API of the API Management service instance. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json */ async function apiManagementDeleteApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApi(); + apiManagementDeleteApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts index bb786b3e0770..26c439d90060 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. @@ -24,40 +22,40 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json */ async function apiManagementCreateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiDiagnostic(); + apiManagementCreateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts index 3c10221ab17f..aa8a5f161fad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json */ async function apiManagementDeleteApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.delete( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiDiagnostic(); + apiManagementDeleteApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts index fee3ff7ccecc..bf58d09ae1c5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json */ async function apiManagementHeadApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.getEntityTag( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementHeadApiDiagnostic(); + apiManagementHeadApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts index b7c47ea2ae7a..958454537dbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json */ async function apiManagementGetApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const diagnosticId = "applicationinsights"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + resourceGroupName, + serviceName, + apiId, + diagnosticId + ); + console.log(result); } async function main() { - apiManagementGetApiDiagnostic(); + apiManagementGetApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts index 1e3cf1eb81f3..4ea53d829c79 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json */ async function apiManagementListApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiDiagnostic.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiDiagnostics(); + apiManagementListApiDiagnostics(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts index 98db9f1389bd..29c842a7dc5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiDiagnosticUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - DiagnosticContract, - ApiManagementClient + ApiManagementClient, + DiagnosticContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. @@ -24,42 +22,42 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json */ async function apiManagementUpdateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] } - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const diagnosticId = "applicationinsights"; + const ifMatch = "*"; + const parameters: DiagnosticContract = { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] } + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiDiagnostic(); + apiManagementUpdateApiDiagnostic(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts index 0bc983750541..baff554b9c6b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiExportGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json */ async function apiManagementGetApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const format = "swagger-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } /** @@ -48,29 +46,29 @@ async function apiManagementGetApiExportInOpenApi2Dot0() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json */ async function apiManagementGetApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "aid9676"; + const format = "openapi-link"; + const exportParam = "true"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + resourceGroupName, + serviceName, + apiId, + format, + exportParam + ); + console.log(result); } async function main() { - apiManagementGetApiExportInOpenApi2Dot0(); - apiManagementGetApiExportInOpenApi3Dot0(); + apiManagementGetApiExportInOpenApi2Dot0(); + apiManagementGetApiExportInOpenApi3Dot0(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts index 2b95bbce1f20..b9f0cee28c4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json */ async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApi(); + apiManagementHeadApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts index 6be69f527b3f..d07bec76b215 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API specified by its identifier. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json */ async function apiManagementGetApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } /** @@ -40,21 +38,21 @@ async function apiManagementGetApiContract() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json */ async function apiManagementGetApiRevisionContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api;rev=3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get(resourceGroupName, serviceName, apiId); + console.log(result); } async function main() { - apiManagementGetApiContract(); - apiManagementGetApiRevisionContract(); + apiManagementGetApiContract(); + apiManagementGetApiRevisionContract(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts index cbe5617fbf06..5457d216d7f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueAttachmentContract, - ApiManagementClient + ApiManagementClient, + IssueAttachmentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json */ async function apiManagementCreateApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment." - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const parameters: IssueAttachmentContract = { + content: "IEJhc2U2NA==", + contentFormat: "image/jpeg", + title: "Issue attachment." + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueAttachment(); + apiManagementCreateApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts index fbfe39d80766..2a892d115020 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json */ async function apiManagementDeleteApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueAttachment(); + apiManagementDeleteApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts index 2c4e90eb568f..ae5a940bee71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json */ async function apiManagementHeadApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueAttachment(); + apiManagementHeadApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts index 0d908d111952..899219feb7c3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json */ async function apiManagementGetApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const attachmentId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueAttachment(); + apiManagementGetApiIssueAttachment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts index ee061f31375f..ad0012d54651 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueAttachmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json */ async function apiManagementListApiIssueAttachments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueAttachment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueAttachments(); + apiManagementListApiIssueAttachments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts index 32936cb7b1cc..1682afae2437 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueCommentContract, - ApiManagementClient + ApiManagementClient, + IssueCommentContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. @@ -24,35 +22,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json */ async function apiManagementCreateApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const parameters: IssueCommentContract = { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssueComment(); + apiManagementCreateApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts index 834fcd9846b3..94e1240c3e35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified comment from an Issue. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json */ async function apiManagementDeleteApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssueComment(); + apiManagementDeleteApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts index cf361ab2bf4a..0e07c75463ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json */ async function apiManagementHeadApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssueComment(); + apiManagementHeadApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts index a653c91031fc..acbc31fbb053 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json */ async function apiManagementGetApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const commentId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + resourceGroupName, + serviceName, + apiId, + issueId, + commentId + ); + console.log(result); } async function main() { - apiManagementGetApiIssueComment(); + apiManagementGetApiIssueComment(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts index 0f707b25fdc6..f61d5a58bda5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCommentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json */ async function apiManagementListApiIssueComments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssueComment.listByService( + resourceGroupName, + serviceName, + apiId, + issueId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssueComments(); + apiManagementListApiIssueComments(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts index 17118262adfb..c1656d0d4144 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, IssueContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. @@ -21,35 +19,35 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json */ async function apiManagementCreateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const parameters: IssueContract = { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + issueId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiIssue(); + apiManagementCreateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts index 62947660fdae..7638e5ff53b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Issue from an API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json */ async function apiManagementDeleteApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.delete( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiIssue(); + apiManagementDeleteApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts index 9a4b143c4da3..21c8fba6ffdb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json */ async function apiManagementHeadApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.getEntityTag( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementHeadApiIssue(); + apiManagementHeadApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts index b806298655a6..37158457ff78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json */ async function apiManagementGetApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + resourceGroupName, + serviceName, + apiId, + issueId + ); + console.log(result); } async function main() { - apiManagementGetApiIssue(); + apiManagementGetApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts index e40ae7fd2e07..65f0b8edcc6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all issues associated with the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json */ async function apiManagementListApiIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiIssue.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiIssues(); + apiManagementListApiIssues(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts index 25a011cbee75..6665ab334d43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiIssueUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - IssueUpdateContract, - ApiManagementClient + ApiManagementClient, + IssueUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing issue for an API. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json */ async function apiManagementUpdateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const issueId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const parameters: IssueUpdateContract = { state: "closed" }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiIssue(); + apiManagementUpdateApiIssue(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts index e1d94d424419..76669128b1cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all APIs of the API Management service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json */ async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApis(); + apiManagementListApis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts index 8a067b4d7eff..e850100bb822 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of apis associated with tags. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json */ async function apiManagementListApisByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.api.listByTags( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.api.listByTags( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApisByTags(); + apiManagementListApisByTags(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts index 75c47d43d0ff..59541db1b3e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementOperationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. @@ -21,17 +19,17 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOperations.json */ async function apiManagementListOperations() { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (let item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (let item of client.apiManagementOperations.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListOperations(); + apiManagementListOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts index dfd4316b30c0..b56e46ebb737 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -25,29 +23,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json */ async function apiManagementApplyNetworkConfigurationUpdates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us" - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { - parameters - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { + location: "west us" + }; + const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + parameters + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName, + serviceName, + options + ); + console.log(result); } async function main() { - apiManagementApplyNetworkConfigurationUpdates(); + apiManagementApplyNetworkConfigurationUpdates(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts index b03c356fdfc1..80209b4270df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceBackupSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -24,26 +22,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json */ async function apiManagementBackupWithAccessKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -53,25 +51,25 @@ async function apiManagementBackupWithAccessKey() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json */ async function apiManagementBackupWithSystemManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -81,32 +79,32 @@ async function apiManagementBackupWithSystemManagedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json */ async function apiManagementBackupWithUserAssignedManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginBackupAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementBackupWithAccessKey(); - apiManagementBackupWithSystemManagedIdentity(); - apiManagementBackupWithUserAssignedManagedIdentity(); + apiManagementBackupWithAccessKey(); + apiManagementBackupWithSystemManagedIdentity(); + apiManagementBackupWithUserAssignedManagedIdentity(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts index 1a25f9a44a64..3b03fe23aa8f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceCheckNameAvailabilityParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. @@ -24,21 +22,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json */ async function apiManagementServiceCheckNameAvailability() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.checkNameAvailability( - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { + name: "apimService1" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability( + parameters + ); + console.log(result); } async function main() { - apiManagementServiceCheckNameAvailability(); + apiManagementServiceCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts index 5f7ab735d7d9..1542c0c35733 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceResource, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceResource } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -24,56 +22,56 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json */ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 } - } - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net" - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net" - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net" - } - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + additionalLocations: [ + { + disableGateway: true, + location: "East US", + sku: { name: "Premium", capacity: 1 } + } + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net" + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net" + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net" + } + ], + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -83,26 +81,26 @@ async function apiManagementCreateMultiRegionServiceWithCustomHostname() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json */ async function apiManagementCreateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { name: "Contoso", test: "User" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -112,27 +110,27 @@ async function apiManagementCreateService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json */ async function apiManagementCreateServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -142,34 +140,34 @@ async function apiManagementCreateServiceHavingMsi() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json */ async function apiManagementCreateServiceInVnetWithPublicIP() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" - }, - virtualNetworkType: "External", - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + virtualNetworkType: "External", + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -179,27 +177,27 @@ async function apiManagementCreateServiceInVnetWithPublicIP() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json */ async function apiManagementCreateServiceInZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -209,58 +207,58 @@ async function apiManagementCreateServiceInZones() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json */ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" - } - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} - } - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: + "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {} + } + }, + location: "North Europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + virtualNetworkType: "None" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -270,27 +268,27 @@ async function apiManagementCreateServiceWithCustomHostnameKeyVault() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json */ async function apiManagementCreateServiceWithNatGatewayEnabled() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -300,34 +298,34 @@ async function apiManagementCreateServiceWithNatGatewayEnabled() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json */ async function apiManagementCreateServiceWithSystemCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority" - } - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: + "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority" + } + ], + location: "Central US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -337,32 +335,32 @@ async function apiManagementCreateServiceWithSystemCertificates() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json */ async function apiManagementCreateServiceWithUserAssignedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} - } - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -372,39 +370,39 @@ async function apiManagementCreateServiceWithUserAssignedIdentity() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json */ async function apiManagementUndelete() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceResource = { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateMultiRegionServiceWithCustomHostname(); - apiManagementCreateService(); - apiManagementCreateServiceHavingMsi(); - apiManagementCreateServiceInVnetWithPublicIP(); - apiManagementCreateServiceInZones(); - apiManagementCreateServiceWithCustomHostnameKeyVault(); - apiManagementCreateServiceWithNatGatewayEnabled(); - apiManagementCreateServiceWithSystemCertificates(); - apiManagementCreateServiceWithUserAssignedIdentity(); - apiManagementUndelete(); + apiManagementCreateMultiRegionServiceWithCustomHostname(); + apiManagementCreateService(); + apiManagementCreateServiceHavingMsi(); + apiManagementCreateServiceInVnetWithPublicIP(); + apiManagementCreateServiceInZones(); + apiManagementCreateServiceWithCustomHostnameKeyVault(); + apiManagementCreateServiceWithNatGatewayEnabled(); + apiManagementCreateServiceWithSystemCertificates(); + apiManagementCreateServiceWithUserAssignedIdentity(); + apiManagementUndelete(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts index dfd1f991b2c0..e8c94d35e97d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes an existing API Management service. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json */ async function apiManagementServiceDeleteService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginDeleteAndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceDeleteService(); + apiManagementServiceDeleteService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts index 8397ca8c3e72..f0f8d220e5d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. @@ -21,16 +19,16 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json */ async function apiManagementServiceGetDomainOwnershipIdentifier() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); } async function main() { - apiManagementServiceGetDomainOwnershipIdentifier(); + apiManagementServiceGetDomainOwnershipIdentifier(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts index 7163797c6d8d..2441ddb4d138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets an API Management service resource description. @@ -21,18 +19,18 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json */ async function apiManagementServiceGetMultiRegionInternalVnet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -42,18 +40,18 @@ async function apiManagementServiceGetMultiRegionInternalVnet() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json */ async function apiManagementServiceGetService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } /** @@ -63,24 +61,24 @@ async function apiManagementServiceGetService() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json */ async function apiManagementServiceGetServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetMultiRegionInternalVnet(); - apiManagementServiceGetService(); - apiManagementServiceGetServiceHavingMsi(); + apiManagementServiceGetMultiRegionInternalVnet(); + apiManagementServiceGetService(); + apiManagementServiceGetServiceHavingMsi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts index 5b7a9b85fd34..9fcb0310a374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceGetSsoTokenSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json */ async function apiManagementServiceGetSsoToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementServiceGetSsoToken(); + apiManagementServiceGetSsoToken(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts index 68347b154435..d8cfdb77b689 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all API Management services within a resource group. @@ -21,23 +19,23 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json */ async function apiManagementListServiceBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscriptionAndResourceGroup(); + apiManagementListServiceBySubscriptionAndResourceGroup(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts index dae98cd98de7..b1b37bc3392a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all API Management services within an Azure subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json */ async function apiManagementListServiceBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementService.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListServiceBySubscription(); + apiManagementListServiceBySubscription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts index 12b4f998926b..ade1818aa1f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceMigrateToStv2Sample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json */ async function apiManagementMigrateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginMigrateToStv2AndWait( + resourceGroupName, + serviceName + ); + console.log(result); } async function main() { - apiManagementMigrateService(); + apiManagementMigrateService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts index d74b73856aad..192343606f8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceRestoreSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceBackupRestoreParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json */ async function apiManagementRestoreService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceBackupRestoreParameters = { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginRestoreAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementRestoreService(); + apiManagementRestoreService(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts index 7e0ad8f9d06f..d50bfe252c7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all available SKU for a given API Management service @@ -21,21 +19,21 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json */ async function apiManagementListSkUsConsumption() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } /** @@ -45,26 +43,26 @@ async function apiManagementListSkUsConsumption() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json */ async function apiManagementListSkUsDedicated() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementServiceSkus.listAvailableServiceSkus( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListSkUsConsumption(); - apiManagementListSkUsDedicated(); + apiManagementListSkUsConsumption(); + apiManagementListSkUsDedicated(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts index ea2ec6b8aad9..42ca5995a30d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementServiceUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiManagementServiceUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiManagementServiceUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing API Management service. @@ -24,24 +22,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json */ async function apiManagementUpdateServiceDisableTls10() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + customProperties: { + microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -51,23 +49,23 @@ async function apiManagementUpdateServiceDisableTls10() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json */ async function apiManagementUpdateServicePublisherDetails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } /** @@ -77,49 +75,49 @@ async function apiManagementUpdateServicePublisherDetails() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json */ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - additionalLocations: [ - { - location: "Australia East", + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const parameters: ApiManagementServiceUpdateParameters = { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + zones: ["1", "2", "3"] + } + ], publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", sku: { name: "Premium", capacity: 3 }, virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + subnetResourceId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" }, + virtualNetworkType: "External", zones: ["1", "2", "3"] - } - ], - publicIpAddressId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters - ); - console.log(result); + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateServiceDisableTls10(); - apiManagementUpdateServicePublisherDetails(); - apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); + apiManagementUpdateServiceDisableTls10(); + apiManagementUpdateServicePublisherDetails(); + apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts index 7e31e185e783..f6760b07e8c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiManagementSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -21,19 +19,19 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json */ async function listsAllAvailableResourceSkUs() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiManagementSkus.list()) { + resArray.push(item); + } + console.log(resArray); } async function main() { - listsAllAvailableResourceSkUs(); + listsAllAvailableResourceSkUs(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts index 57ddd217eb6b..e91d9872911e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationContract, - ApiManagementClient + ApiManagementClient, + OperationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new operation in the API or updates an existing one. @@ -24,57 +22,57 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json */ async function apiManagementCreateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User" - } - ] - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" } - ], - statusCode: 200 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "PetStoreTemplate2"; + const operationId = "newoperations"; + const parameters: OperationContract = { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User" + } + ] + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" } + ], + statusCode: 200 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiOperation(); + apiManagementCreateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts index d414082a183c..92fe8fc6b30c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified operation in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json */ async function apiManagementDeleteApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperation(); + apiManagementDeleteApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts index 3cebed551155..05c267acae11 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json */ async function apiManagementHeadApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperation(); + apiManagementHeadApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts index 10b16a1eceeb..c8cef3845950 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. @@ -21,22 +19,22 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json */ async function apiManagementGetApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const operationId = "57d2ef278aa04f0ad01d6cdc"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } /** @@ -46,27 +44,27 @@ async function apiManagementGetApiOperation() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json */ async function apiManagementGetApiOperationPetStore() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "swagger-petstore"; + const operationId = "loginUser"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementGetApiOperation(); - apiManagementGetApiOperationPetStore(); + apiManagementGetApiOperation(); + apiManagementGetApiOperationPetStore(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts index 67fec5856be7..acfbebdfc843 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the operations for the specified API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json */ async function apiManagementListApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiOperation.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiOperations(); + apiManagementListApiOperations(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts index 97461f9f8ac8..6cd9f3b7f173 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiOperationPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. @@ -25,37 +23,37 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json */ async function apiManagementCreateApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const operationId = "5600b57e7e8880006a080001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiOperationPolicy(); + apiManagementCreateApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts index 4478ff0fa99a..c810922ed199 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api Operation. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json */ async function apiManagementDeleteApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "testapi"; + const operationId = "testoperation"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.delete( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiOperationPolicy(); + apiManagementDeleteApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts index 5bc3e6ddd58e..8fde1fa291df 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json */ async function apiManagementHeadApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiOperationPolicy(); + apiManagementHeadApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts index cab61e48b966..d7b2c3bbcc12 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API Operation level. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json */ async function apiManagementGetApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b539c53f5b0062040001"; + const operationId = "5600b53ac53f5b0062080006"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + resourceGroupName, + serviceName, + apiId, + operationId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiOperationPolicy(); + apiManagementGetApiOperationPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts index aa843602a285..17f947b56216 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationPolicyListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the API Operation level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json */ async function apiManagementListApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "599e2953193c3c0bd0b3e2fa"; + const operationId = "599e29ab193c3c0bd0b3e2fb"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId + ); + console.log(result); } async function main() { - apiManagementListApiOperationPolicies(); + apiManagementListApiOperationPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts index 0f79451fcfb9..beb38dd57c47 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiOperationUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - OperationUpdateContract, - ApiManagementClient + ApiManagementClient, + OperationUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. @@ -24,62 +22,62 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json */ async function apiManagementUpdateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"] - } - ] - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200 - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500 - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const operationId = "operationId"; + const ifMatch = "*"; + const parameters: OperationUpdateContract = { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: + 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"] + } + ] + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200 + }, + { + description: "Server Error.", + headers: [], + representations: [], + statusCode: 500 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiOperation(); + apiManagementUpdateApiOperation(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts index fa605ca9b679..04aecfe419bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyCreateOrUpdateSample.ts @@ -9,14 +9,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient + ApiManagementClient, + ApiPolicyCreateOrUpdateOptionalParams, + PolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the API. @@ -25,31 +23,31 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json */ async function apiManagementCreateApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " " - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "xml", + value: + " " + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } /** @@ -59,36 +57,36 @@ async function apiManagementCreateApiPolicy() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json */ async function apiManagementCreateApiPolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b57e7e8880006a040001"; + const policyId = "policy"; + const ifMatch = "*"; + const parameters: PolicyContract = { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ' + }; + const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options + ); + console.log(result); } async function main() { - apiManagementCreateApiPolicy(); - apiManagementCreateApiPolicyNonXmlEncoded(); + apiManagementCreateApiPolicy(); + apiManagementCreateApiPolicyNonXmlEncoded(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts index d129e7c63897..b8fc907fc1e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json */ async function apiManagementDeleteApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "loggerId"; + const policyId = "policy"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.delete( + resourceGroupName, + serviceName, + apiId, + policyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiPolicy(); + apiManagementDeleteApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts index 65d78626c8c0..1cb14c5148db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json */ async function apiManagementHeadApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.getEntityTag( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementHeadApiPolicy(); + apiManagementHeadApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts index 144ec3c40c84..a0607e87cb7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json */ async function apiManagementGetApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const policyId = "policy"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + resourceGroupName, + serviceName, + apiId, + policyId + ); + console.log(result); } async function main() { - apiManagementGetApiPolicy(); + apiManagementGetApiPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts index 288412e2c710..7b478adfc0e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiPolicyListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the API level. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json */ async function apiManagementListApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5600b59475ff190048040001"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementListApiPolicies(); + apiManagementListApiPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts index d318b1473b02..0070ec9cab90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiProductListByApisSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Products, which the API is part of. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json */ async function apiManagementListApiProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiProduct.listByApis( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiProducts(); + apiManagementListApiProducts(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts index cb79c7d8ac65..73d39ee9612c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Release for the API. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json */ async function apiManagementCreateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiRelease(); + apiManagementCreateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts index 5632e6d7ca5f..c336777b384b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified release in the API. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json */ async function apiManagementDeleteApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5a5fcc09124a7fa9b89f2f1d"; + const releaseId = "testrev"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.delete( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiRelease(); + apiManagementDeleteApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts index 22a8e6432079..a82d98e30885 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the etag of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json */ async function apiManagementHeadApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.getEntityTag( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementHeadApiRelease(); + apiManagementHeadApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts index 910b9cc7aa94..fd9b137f6bd4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the details of an API release. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json */ async function apiManagementGetApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "5a7cb545298324c53224a799"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + resourceGroupName, + serviceName, + apiId, + releaseId + ); + console.log(result); } async function main() { - apiManagementGetApiRelease(); + apiManagementGetApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts index 8d7992118402..64127e944b8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json */ async function apiManagementListApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRelease.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiReleases(); + apiManagementListApiReleases(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts index 36d6b1ea7b60..2ce58ccc3844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiReleaseUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiReleaseContract, - ApiManagementClient + ApiManagementClient, + ApiReleaseContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. @@ -24,34 +22,34 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json */ async function apiManagementUpdateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "a1"; + const releaseId = "testrev"; + const ifMatch = "*"; + const parameters: ApiReleaseContract = { + apiId: + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update( + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiRelease(); + apiManagementUpdateApiRelease(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts index 369b6861fae5..576b24fb92ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all revisions of an API. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json */ async function apiManagementListApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiRevision.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiRevisions(); + apiManagementListApiRevisions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts index e83665edc36a..41be2f7461da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, SchemaContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates schema configuration for the API. @@ -21,32 +19,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json */ async function apiManagementCreateApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const parameters: SchemaContract = { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n' + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiSchema(); + apiManagementCreateApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts index e3295239b6d1..713facf24838 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the schema configuration at the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json */ async function apiManagementDeleteApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const schemaId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.delete( + resourceGroupName, + serviceName, + apiId, + schemaId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiSchema(); + apiManagementDeleteApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts index 152d4181d025..2aedc068386e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json */ async function apiManagementHeadApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.getEntityTag( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementHeadApiSchema(); + apiManagementHeadApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts index 0c9e2208fe4e..40781462ab34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json */ async function apiManagementGetApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + resourceGroupName, + serviceName, + apiId, + schemaId + ); + console.log(result); } async function main() { - apiManagementGetApiSchema(); + apiManagementGetApiSchema(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts index b82721c480f1..5b592fd0ac0b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiSchemaListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the schema configuration at the API level. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json */ async function apiManagementListApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiSchema.listByApi( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiSchemas(); + apiManagementListApiSchemas(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts index a47471031228..a684f521a1fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - TagDescriptionCreateParameters, - ApiManagementClient + ApiManagementClient, + TagDescriptionCreateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create/Update tag description in scope of the Api. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json */ async function apiManagementCreateApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "5931a75ae4bbd512a88c680b"; + const tagDescriptionId = "tagId1"; + const parameters: TagDescriptionCreateParameters = { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiTagDescription(); + apiManagementCreateApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts index bb648aafb5be..c89fd8aa72e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete tag description for the Api. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json */ async function apiManagementDeleteApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d5b28d1f7fab116c282650"; + const tagDescriptionId = "59d5b28e1f7fab116402044e"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.delete( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiTagDescription(); + apiManagementDeleteApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts index da9fc62a5c2a..0507a111064c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json */ async function apiManagementHeadApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.getEntityTag( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementHeadApiTagDescription(); + apiManagementHeadApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts index afe59cf901ea..f65ddc6b08a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Tag description in scope of API @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json */ async function apiManagementGetApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "59d6bb8f1f7fab13dc67ec9b"; + const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + resourceGroupName, + serviceName, + apiId, + tagDescriptionId + ); + console.log(result); } async function main() { - apiManagementGetApiTagDescription(); + apiManagementGetApiTagDescription(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts index 87dc8f957b82..fe39c620a5c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiTagDescriptionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json */ async function apiManagementListApiTagDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d2ef278aa04f0888cba3f3"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiTagDescription.listByService( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiTagDescriptions(); + apiManagementListApiTagDescriptions(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts index 452f2a8c93fc..c1bd6c38b496 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiUpdateContract, - ApiManagementClient + ApiManagementClient, + ApiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified API of the API Management service instance. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json */ async function apiManagementUpdateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "echo-api"; + const ifMatch = "*"; + const parameters: ApiUpdateContract = { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApi(); + apiManagementUpdateApi(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts index e99607ed0708..cdf359c7a089 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetContract, - ApiManagementClient + ApiManagementClient, + ApiVersionSetContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a Api Version Set. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json */ async function apiManagementCreateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "api1"; + const parameters: ApiVersionSetContract = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate( + resourceGroupName, + serviceName, + versionSetId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiVersionSet(); + apiManagementCreateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts index 1b5131200550..2536236caf34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Api Version Set. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json */ async function apiManagementDeleteApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "a1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.delete( + resourceGroupName, + serviceName, + versionSetId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiVersionSet(); + apiManagementDeleteApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts index a13138798b8a..d9293aa44755 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json */ async function apiManagementHeadApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.getEntityTag( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementHeadApiVersionSet(); + apiManagementHeadApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts index 3c18cf6498b8..2a4661ef56bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json */ async function apiManagementGetApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get( + resourceGroupName, + serviceName, + versionSetId + ); + console.log(result); } async function main() { - apiManagementGetApiVersionSet(); + apiManagementGetApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts index e69cc77fbc18..1be2c7635edc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. @@ -21,25 +19,25 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json */ async function apiManagementListApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiVersionSet.listByService( + resourceGroupName, + serviceName + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiVersionSets(); + apiManagementListApiVersionSets(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts index f24581aaafc9..5e435142f803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiVersionSetUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - ApiVersionSetUpdateParameters, - ApiManagementClient + ApiManagementClient, + ApiVersionSetUpdateParameters } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. @@ -24,32 +22,32 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json */ async function apiManagementUpdateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const versionSetId = "vs1"; + const ifMatch = "*"; + const parameters: ApiVersionSetUpdateParameters = { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update( + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiVersionSet(); + apiManagementUpdateApiVersionSet(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts index ff3225655428..d388065c605f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiCreateOrUpdateSample.ts @@ -8,11 +8,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; +import { ApiManagementClient, WikiContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json */ async function apiManagementCreateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const parameters: WikiContract = { + documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateApiWiki(); + apiManagementCreateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts index 6264ade4faf7..2f9eb975013e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from an API. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json */ async function apiManagementDeleteApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.delete( + resourceGroupName, + serviceName, + apiId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteApiWiki(); + apiManagementDeleteApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts index 0357a5166461..7cadca565ddf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json */ async function apiManagementHeadApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.getEntityTag( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementHeadApiWiki(); + apiManagementHeadApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts index 359249679756..e1ebfee205c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. @@ -21,24 +19,24 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json */ async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get( + resourceGroupName, + serviceName, + apiId + ); + console.log(result); } async function main() { - apiManagementGetApiWiki(); + apiManagementGetApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts index 0e9975b5e0ed..6a334372a2ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikiUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - WikiUpdateContract, - ApiManagementClient + ApiManagementClient, + WikiUpdateContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json */ async function apiManagementUpdateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }] - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const ifMatch = "*"; + const parameters: WikiUpdateContract = { + documents: [{ documentationId: "docId1" }] + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters + ); + console.log(result); } async function main() { - apiManagementUpdateApiWiki(); + apiManagementUpdateApiWiki(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts index 8fabc4f2fdfc..103a943a3408 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/apiWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the wikis for an API specified by its identifier. @@ -21,27 +19,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiWikis.json */ async function apiManagementListApiWikis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const apiId = "57d1f7558aa04f15146d9d8a"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.apiWikis.list( + resourceGroupName, + serviceName, + apiId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListApiWikis(); + apiManagementListApiWikis(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts index bbad6c195ebc..6ca83513025b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationAccessPolicyContract, - ApiManagementClient + ApiManagementClient, + AuthorizationAccessPolicyContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates Authorization Access Policy. @@ -24,33 +22,33 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json */ async function apiManagementCreateAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const parameters: AuthorizationAccessPolicyContract = { + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAccessPolicy(); + apiManagementCreateAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts index 96e976d1186f..5c6a74192fe1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific access policy from the Authorization. @@ -21,30 +19,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json */ async function apiManagementDeleteAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorizationAccessPolicy(); + apiManagementDeleteAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts index fe3c3e9890dd..907ba43ff887 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json */ async function apiManagementGetAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId + ); + console.log(result); } async function main() { - apiManagementGetAuthorizationAccessPolicy(); + apiManagementGetAuthorizationAccessPolicy(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts index c09bd1ad1709..e093bea742ca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. @@ -21,29 +19,29 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json */ async function apiManagementListAuthorizationAccessPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - )) { - resArray.push(item); - } - console.log(resArray); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.authorizationAccessPolicy.listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + )) { + resArray.push(item); + } + console.log(resArray); } async function main() { - apiManagementListAuthorizationAccessPolicies(); + apiManagementListAuthorizationAccessPolicies(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts index 547d469315fa..02e3c9430ee1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationConfirmConsentCodeSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient + ApiManagementClient, + AuthorizationConfirmConsentCodeRequestContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. @@ -24,30 +22,30 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json */ async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const parameters: AuthorizationConfirmConsentCodeRequestContract = { + consentCode: "theconsentcode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.confirmConsentCode( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementPostAuthorizationConfirmConsentCodeRequest(); + apiManagementPostAuthorizationConfirmConsentCodeRequest(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts index 1a82f36465af..a60e56983ca4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationCreateOrUpdateSample.ts @@ -9,13 +9,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { - AuthorizationContract, - ApiManagementClient + ApiManagementClient, + AuthorizationContract } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization. @@ -24,27 +22,27 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json */ async function apiManagementCreateAuthorizationAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode" - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz2"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode" + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } /** @@ -54,36 +52,36 @@ async function apiManagementCreateAuthorizationAadAuthCode() { * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json */ async function apiManagementCreateAuthorizationAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "", - clientSecret: "" - } - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithclientcred"; + const authorizationId = "authz1"; + const parameters: AuthorizationContract = { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { + clientId: "", + clientSecret: "" + } + }; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters + ); + console.log(result); } async function main() { - apiManagementCreateAuthorizationAadAuthCode(); - apiManagementCreateAuthorizationAadClientCred(); + apiManagementCreateAuthorizationAadAuthCode(); + apiManagementCreateAuthorizationAadClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts index f049fbee5467..6fa94c732ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. @@ -21,28 +19,28 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json */ async function apiManagementDeleteAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const ifMatch = "*"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.delete( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch + ); + console.log(result); } async function main() { - apiManagementDeleteAuthorization(); + apiManagementDeleteAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts index be32aa09673c..378f747c27e2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization specified by its identifier. @@ -21,26 +19,26 @@ dotenv.config(); * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json */ async function apiManagementGetAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId - ); - console.log(result); + const subscriptionId = + process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid"; + const resourceGroupName = + process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; + const serviceName = "apimService1"; + const authorizationProviderId = "aadwithauthcode"; + const authorizationId = "authz1"; + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId + ); + console.log(result); } async function main() { - apiManagementGetAuthorization(); + apiManagementGetAuthorization(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts index 18367a048a92..ae80b4300efb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationListByAuthorizationProviderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts index d82ee1d5c076..1f49c6e178ea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationLoginLinksPostSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets authorization login links. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts index 82b92215f73d..97e851aea9bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates authorization provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts index 07df09fdf5d7..8babd107bee7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts index 50b24da54c3c..f4890a98db67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts index 8e52e14dc82e..3f9cb3add92d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts index bbfb1a8599c5..82ba32e4e78a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts index 3ead60ddd985..55d9eea9a140 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific authorization server instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts index 959f296d1087..1e358dd47774 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts index 322be95d80db..465e8b1cbb15 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts index 56d4ccf2e5e3..93274758d873 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts index 6d2fbddadcee..8ca131687223 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the authorization server. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts index 24b94f08763c..05d323bd2aec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/authorizationServerUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts index c962b8e6b75f..0ab8b09e56a7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts index 89e8c3271c29..02e67bc34530 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts index 06cc146efc13..2bd014746f3a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts index c2d4ae96f020..ed7237aa6df4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the backend specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts index 0ea9b79265ac..ab8918109117 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of backends in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts index a60be7c63a0d..8e00c30f54f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendReconnectSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts index 164258fb978d..0f7328aeeb25 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/backendUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts index 7fa6eb6b20b2..7d56fe384d86 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts index 80b4454d8db3..e768c682e6ea 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Cache. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts index 777ee99d6b6a..134e0b75a023 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts index df653474196e..b09a9ca84840 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts index 655ecf451ab5..881da8a2c120 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts index 72414be63f55..5312f34386a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/cacheUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the cache specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts index 39f489f9dc7f..8972ef317f2d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts index 6a9d5dd55b4d..e9cfdd16ed7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific certificate. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts index a10bcb576854..cda6e2f48f3d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts index ae96d2c19d89..3ec4aef0c177 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the certificate specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts index 3f53047c01a7..91b6095dc55a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts index 2df0975cf3d9..7f1c43b2771c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/certificateRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts index e650e8e1978c..9567a195ed67 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts index 11087f6fc4f8..fcd96517a5b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content item. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts index ff7b36dcc8fc..1511c36041bc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts index 968f7c3e2f59..cc5a8fcc8fbf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts index d5684141c4f0..d42de360250d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentItemListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts index 1bd7e4b5480e..7f668c610449 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts index 06a31ac831f8..3b0ab0755877 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts index 704be3e32425..0009abcfe9a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts index bfa265259683..fe5ba00fd77d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/contentTypeListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts index fc1b1af5df15..24ec62bacc00 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Delegation settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts index b475a59e8cae..983dc92bd49b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts index 75b202cf5f2d..f38d5aea198a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Delegation Settings for the Portal. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts index e25d4dbb0799..39ce5a4d6c17 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts index 7b55289658ab..4dd5090b9661 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/delegationSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Delegation settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts index 337137849a4c..cddd5476b1c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get soft-deleted Api Management Service by name. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts index 5eeb2e8df550..517c8131c05b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts index a94e70bc93a6..4eb15012f767 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/deletedServicesPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts index 70a9099bd2df..11b9025b2480 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts index bf4f61249fba..25fc2a67bfe9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Diagnostic. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts index bf02e420f049..9b260be4bb7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts index 2f03f3c2761e..a9b9e39e99bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts index af3227d1b4ee..56dcf18ed0ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all diagnostics of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts index 25129fa4da7f..564e09d884c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/diagnosticUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts index c93160bb7a2a..5be833175b70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Documentation or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts index 53e3bffd4cf8..8f1cdd504653 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Documentation from an API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts index 759b162c1923..48ef3304d283 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts index 36c1dee0d237..5937e2d7f329 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts index 81d580cba1c0..29d44b6b200b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Documentations of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts index 75c50bab8387..59835430916b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/documentationUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts index 7728b147c808..a3d1c6b184fd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an Email Template. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts index b71dcb4448f2..05bb3f200a8b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts index 16ef6774de91..0e7bd779cd4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts index aeca9f9c866f..51ab3196c3d3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the email template specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts index 63bc176c0c17..e88513f46a8a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all email templates diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts index 8d8bc4674f2a..429944876a41 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/emailTemplateUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates API Management email template diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts index 18d91215c721..89967a0a7f92 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts index 545a5fb3fa6c..87b8e5142545 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts index c76d571bda2b..d8ebc50ec920 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts index 219156cf842f..6c8b96d2c049 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayApiListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts index 7f02030ccead..21bed98fe1b6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts index 64119cc426fe..13992f1570e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts index ad89c233c59d..cd0fd26077cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts index 91b55f332cfd..4d74ef3c5467 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get assigned Gateway Certificate Authority details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts index 46ca481ae49a..232560e95569 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts index f9591b69eda0..8156b32b1f68 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts index 1bea683bd048..0f9ba3c2f500 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts index 80a2efeba293..b058f9c07649 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGenerateTokenSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts index 0f48e7d8330d..f14638bd080e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts index c1bdd463a2c0..517c95230b48 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts index 1639e06ed352..63f9197c9dc5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts index 54c551d5ca3f..160f54ca3315 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts index 3b69b1ded4ac..4610849de011 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts index 5d4c94cf881c..4d146ac98e63 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get details of a hostname configuration diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts index 601b7cdf9380..f3c1bac39066 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts index c46a48468460..cc948b6565f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of gateways registered with service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts index 5336e78a40e4..e3e7a5e3f3fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves gateway keys. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts index b926cf8923ca..de5fc2ff0b7d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts index 42aac3e1f49b..303c6ac71355 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/gatewayUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the gateway specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts index 32ac578cfd09..882311e80753 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts index 5dbe2be68ada..8ed564ec1429 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific Schema. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts index 2a51c0f0c444..aae11a93d9bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts index 42db81867552..7ed30bce35a9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Schema specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts index ccf80484dc1b..c2819bce284a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/globalSchemaListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of schemas registered with service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts index 0be021db2d26..9bae6f1a0749 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts index 1245129ed7b1..050dfeff5017 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts index b731793feb11..b5317efbe374 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts index 465795df47aa..0f6f1c67902a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts index 214ff987de36..f908800da504 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts index a5d83821ea5a..437d10cb8a23 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts index 8d1d88254c10..2f971f02062b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts index 9833f1305764..bd95f809b803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts index 97caed6b595f..a6fb07c32ef9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts index d5197b45a4a2..4fac6ebf97a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts index 8f314c52b3b0..4550e1c09757 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/graphQlApiResolverUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts index 9f2b325d87e5..640e56f60b73 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts index 48247657e14d..6eb414b51dce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific group of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts index a68c30cc8bfa..cf90c6e1d0a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts index 954018f98006..a056d0ed6180 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts index 898b9bd81891..f6b0e017a27b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of groups defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts index 0b10d48bb5f0..d55efe893709 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the group specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts index 80e1301ef726..d0b673d74844 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts index 478e1258ad62..6621c84864e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add existing user to existing group diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts index 0eaf12e68670..d09862ffd1f6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Remove existing user from existing group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts index fd400a0f3b46..718370543fd6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/groupUserListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of user entities associated with the group. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts index ecfeceb3981f..745850d75956 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts index 71a8daa2cbde..68b1727ed567 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified identity provider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts index 09632aa479ab..dbff02cfe4a5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts index 8b752758b132..411a8de1d914 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts index 5bb324ed67cf..8497615c8772 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts index 70a322ad24bf..01c8c6623602 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the Identity Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts index 0baf25c1a6bb..70b5c8c6ec97 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/identityProviderUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing IdentityProvider configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts index 9402037685c9..eade92bfce5c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets API Management issue details diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts index e03dde4ead14..edc74dd9be21 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/issueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of issues in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts index c3c5cb5ef180..545059b4c223 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts index 14c89372bfbb..d0847ef4c91b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts index c2efb9adfe7f..179ebf9e871f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts index 319d80a96ad3..9c2cbaab4ed2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the logger specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts index 8e8d29247d7d..54a55b5a833b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of loggers in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts index 7bec1a7e2aed..1bd1aa43678b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/loggerUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing logger. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts index b664bf11298b..907796b53a20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates named value. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts index c912a4917fb8..3159d1fb0484 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific named value from the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts index 684c6668907c..701f919fb60a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts index 5d09d87343c4..35e9a9720f20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts index e05a515d0cd9..75464bbb5059 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of named values defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts index 7315ca2e36fd..beb822110aec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueListValueSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the secret of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts index d8b65d0629f4..18346a0fda99 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueRefreshSecretSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts index 9fd0bbc236ff..812dbaf00c4d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/namedValueUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific named value. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts index dcbf086b6585..f9d0e620bafb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByLocationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts index 48fb6a23d155..5a262d87487e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/networkStatusListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts index 95fa2dd5381c..d25f79fd103c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update API Management publisher notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts index 2a08272429b9..85b395b01f3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Notification specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts index 95e627c3ccee..5fa4ed071c24 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of properties defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts index 4441a393355a..db6e289cbb39 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts index 023934f6b822..4a9ca9a70999 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts index 50dfa04d1459..e69289d02ec8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the email from the list of Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts index 9fff72cb91b0..010262b100d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientEmailListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts index bb3198fff996..d99b6b9ec0e7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts index ecd636d6d144..e899940f7f07 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts index 4b9a9cffdc73..9eb3af39d600 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Removes the API Management user from the list of Notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts index 896b3fa1229d..92c5fc09af82 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/notificationRecipientUserListByNotificationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts index d3b7b73512a3..a855b84c8668 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts index 851ef6e96bae..29e30e4c81a0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts index 3fad780de809..846243b8d5cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts index d5b66b9273cf..d35771eb4ee6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts index 12ffc8b82acb..b8b29fde367f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists of all the OpenId Connect Providers. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts index d95e052fdf92..ef33b29baa4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts index fd234805fd9b..24a281a155e7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/openIdConnectProviderUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specific OpenID Connect Provider. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts index dc1f21a02321..2c8012c91e9c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/operationListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of operations associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts index 7898f0ffe380..d22de2c19e9d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts index 76d71f8fae04..43dc71f71905 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/performConnectivityCheckAsyncSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts index f625c32d2ff8..51e919ed3c08 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts index 69985f3c563d..87c5caf13d8c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts index 4ae78b0f8e5b..259703059d2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyDescriptionListByServiceSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all policy descriptions. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts index d703b1724e37..1b294b70238f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts index 8f6a6cdd6606..6bfba4b8d33c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts index cdc2c3e3c213..905eb582f49a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts index 19083d34fdcc..20e083624ee0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentGetSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts index 353baac0c7c2..984bc8d44803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets all policy fragments. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts index 2915136023ac..b3b6c6cd87a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyFragmentListReferencesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists policy resources that reference the policy fragment. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts index 9db6f475ac6c..c0ae8ca5385a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts index 7d7a1ace58ce..9ca6bbca25ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyGetSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Global policy definition of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts index 8d8b7608c482..653cc575caf7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/policyListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts index 4f96bd2686ef..947982c3e13e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts index ce2436ba1b65..a0e2753146eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts index 5463fc5e330b..db1f42783f24 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts index 39148724a093..3db3ce793971 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the developer portal configurations. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts index f46de1dcd5d3..f4e6988009be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalConfigUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update the developer portal configuration. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts index 0246e008cac5..20b8697a8ad3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts index c731ded35a84..59b05472112c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal revision specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts index 90ec6a242e8a..64bbf5a0fa5e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts index 8cf1e88339e6..5229be59f098 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists developer portal's revisions. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts index 7e31dbff5bdf..af5fcf434671 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalRevisionUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the description of specified portal revision or makes it current. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts index b16d6107ba68..94696a61b2b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/portalSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts index 808909204a6f..c0eaf6b89f04 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts index a0cc9313d7b5..da453578a39f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Private Endpoint Connection. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts index ed705263e493..fe4a629d5d8c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetByNameSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts index 10b6a4e2a268..f118c2b14288 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts index 6527fddd32b9..89de1f8143bd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts index 50bed1bc390c..4fdad9396bbd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts index 7e70371099cc..80cbeb29f1c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts index 9e15389960c7..fc2b8e1a37f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds an API to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts index d404bc767db3..9702dd8ceafb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified API from the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts index 53b66522bb8d..230aa0761421 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productApiListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of the APIs associated with a product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts index 6232d0b6ba2c..02b038ec3487 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts index 241c237c9a47..5564bcd7203c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productDeleteSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts index b615b809896e..59c744b9baa3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts index 4ec43bce9e7b..761d0c2ac66e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts index 16437f00cc40..70c014b2dd35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCheckEntityExistsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts index 5ddd2bd110d7..b023171ebd98 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Adds the association between the specified developer group with the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts index 94c45c59a732..2c7ee9ca361f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association between the specified group and product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts index bc88afdb591e..3314fab08dce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productGroupListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts index ae381908848f..10db0392ecd5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts index d8274ee2a74b..23590851bdd6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productListByTagsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of products associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts index 0f73b1c7dec0..544bdfa438f2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates policy configuration for the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts index ddd21565a8ec..ade367012b0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the policy configuration at the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts index 583cd01a7292..72b58d825b56 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts index 8591ab0faa18..b978b18f8a5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts index 592a208c2a38..a11e9557372d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productPolicyListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the policy configuration at the Product level. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts index 92a57cc82332..fae76e7157fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts index 108231efc6eb..37c20095eaab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update existing product details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts index 62626d52456d..e9d41e0dd367 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts index c6a47ccec611..d3eea3eb0f0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Wiki from a Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts index a038f7af6758..b6f6c26115b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts index 813b2cf26058..055b98ae692a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts index 9b7c4f9d648f..07e305a909d6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikiUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts index eae0b06af239..eca421cb8ec6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/productWikisListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts index e30cd43ebd6b..27f49c34e32c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts index 915cac0059d3..85a4429e9a54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByCounterKeysUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts index e6c9445e5125..b65f03337bd5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts index 2a5951cdc029..4fa2acfc3c0f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/quotaByPeriodKeysUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts index efd5680f27b7..b0c32ff87f2f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/regionListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all azure regions in which the service exists. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts index 2c79ef784584..6da489169eaa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts index 09abd47808a9..891c3b1f8ad3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByGeoSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by geography. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts index cf11ce2a1a6d..24bd7cf5544f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by API Operations. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts index ba62392350d4..9aaeed4b0d54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts index 1e164289dd9c..12d5b2ed421e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByRequestSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Request. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts index 6de51ec97e0f..565745332baf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts index 181ea10ce899..bf087208f9a6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByTimeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by Time. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts index 4291513d0653..7c75b2c478fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/reportsListByUserSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists report records by User. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts index f266ccfc4c65..c15bedec0200 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-In settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts index 2c52470d5ce3..db685bb518ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts index 28f28743a6c1..8c49ada03d78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign In Settings for the Portal diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts index c89f5a49379b..d9d5b2a146fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signInSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-In settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts index ad1197c5fffd..5b12deca4e31 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or Update Sign-Up settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts index 9143fe8bdcf0..484d69254188 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts index 319a4b7bd46f..437390c8fecf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Sign Up Settings for the Portal diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts index 7741a12efa7e..c8cd2e80070c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/signUpSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update Sign-Up settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts index 05e275c85dc4..a40b33c0aaf1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts index 67f671d3a2e2..197324b0aa15 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified subscription. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts index 99b2bf3acad1..5a86cfb1ce51 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts index 59dd2b118352..a2f425019ba1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts index 29b594046e65..41dc28ffebb9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all subscriptions of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts index 5965ee649a51..c58c432edc20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription keys. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts index 28088928c4d8..fc3b464e0b30 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts index 575f32f09ce0..8dfe6bfe8bda 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts index dcfdc0e6e6da..325f2f3eac84 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/subscriptionUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of a subscription specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts index 52aa8cbe6993..006208b07baf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Api. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts index 720adf7c4489..1b3ca7357ed8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts index e7327d91cf64..380d56b34279 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagAssignToProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Assign tag to the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts index 95a59272991c..907d113a31de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a tag. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts index ed2af0a78357..b269a87cfe43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific tag of the API Management service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts index adeb2e1c6ea6..1c51028e27c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Api. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts index 55ec990815ff..93f87e9af452 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts index cc92c57bdf3b..82f23db9b587 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagDetachFromProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Detach the tag from the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts index e1f4ad9b464f..1103c5796ac6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts index b500b22c44c0..5809e66ef253 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts index ed0443df7ae3..b695c52cdf49 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tag associated with the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts index f412d5d3df32..1661a79ad6eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts index d6d7ecab6aee..cd29001a72c4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts index b411670bbc87..77aee85764e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts index efab0cd07fa9..65520811f18a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetEntityStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts index a76bd73c4d04..45a9a8b9363c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts index d602d51dfd99..8675ab2e16ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByApiSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the API. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts index d5314d8a8c8e..84e3c69f0d8e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByOperationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Operation. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts index e5f974185617..cae156b7934c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByProductSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all Tags associated with the Product. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts index 1590eb84e906..276fe33ed6fb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of tags defined within a service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts index 7e4fdbdb908a..3d26894624d2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagResourceListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of resources associated with tags. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts index c9cf0351412d..9043d1210efb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tagUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the tag specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts index 5980978da091..a0868d196221 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessCreateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts index 4ad470bacf74..91c023234f72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Tenant access metadata diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts index 89a00b00a34c..1b3949396a90 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details without secrets. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts index b0ebbca83394..2d99e6785773 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key for GIT. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts index 237541c234c1..22536970f9cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key for GIT. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts index b639a89e236d..277ae7d8bce9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts index 084ace7979c0..116f0acde92f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessListSecretsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts index ba54ff5d6c7f..7ab4b6f26d50 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate primary access key diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts index 5bf80798e4e1..124c0b54920c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate secondary access key diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts index 0a45399af35d..219f1c3d3b76 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantAccessUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update tenant access information details. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts index 30a6f486f333..c3caecd37e1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationDeploySample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts index 183413c070e7..7ac5b0151e33 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationGetSyncStateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts index 339b7d8e350b..77dbf47a9eb4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationSaveSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts index 593245c52c97..14248e195d62 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantConfigurationValidateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts index 62f39d5d4132..2aaededecf22 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get tenant settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts index bee5b4a6d6fd..c86b0e1ec470 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/tenantSettingsListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Public settings. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts index fbab7fc3a2cb..722d51a0109a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userConfirmationPasswordSendSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Sends confirmation diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts index f21acf2952a6..20038dcb3857 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates a user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts index b07039d2c5ab..f5170516fe8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes specific user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts index f1e39fe5ea16..9089389b1fa4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGenerateSsoUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts index a8d971057e1e..046323699bc0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetEntityTagSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts index af21ca84b0c8..e9ef37369214 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the details of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts index dae88fd58203..a20d7aa4d3f4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGetSharedAccessTokenSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts index 633fea2229a3..824c9dab7c5f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userGroupListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all user groups. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts index 0e7f010d6fcf..776ba0a53d1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userIdentitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of all user identities. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts index b212a1781a0b..b23973d3c4ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userListByServiceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists a collection of registered users in the specified service instance. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts index d64b3f87dfc2..887f4122002b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts index 47fe92e03081..1247ccbc3509 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userSubscriptionListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the collection of subscriptions of the specified user. diff --git a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts index 17b2ed83fcea..b138c244766f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples/v9/typescript/src/userUpdateSample.ts @@ -13,9 +13,7 @@ import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the details of the user specified by its identifier. diff --git a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts index efdc68f7b9fb..eb66dbfe1014 100644 --- a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts +++ b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts @@ -6,661 +6,661 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreAuth from "@azure/core-auth"; import * as coreClient from "@azure/core-client"; +import { + OperationState, + SimplePollerLike, + createHttpPoller +} from "@azure/core-lro"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { - PipelineRequest, - PipelineResponse, - SendRequest + PipelineRequest, + PipelineResponse, + SendRequest } from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "./lroImpl"; +import { createLroSpec } from "./lroImpl.js"; import { - ApiImpl, - ApiRevisionImpl, - ApiReleaseImpl, - ApiOperationImpl, - ApiOperationPolicyImpl, - TagImpl, - GraphQLApiResolverImpl, - GraphQLApiResolverPolicyImpl, - ApiProductImpl, - ApiPolicyImpl, - ApiSchemaImpl, - ApiDiagnosticImpl, - ApiIssueImpl, - ApiIssueCommentImpl, - ApiIssueAttachmentImpl, - ApiTagDescriptionImpl, - OperationOperationsImpl, - ApiWikiImpl, - ApiWikisImpl, - ApiExportImpl, - ApiVersionSetImpl, - AuthorizationServerImpl, - AuthorizationProviderImpl, - AuthorizationImpl, - AuthorizationLoginLinksImpl, - AuthorizationAccessPolicyImpl, - BackendImpl, - CacheImpl, - CertificateImpl, - ContentTypeImpl, - ContentItemImpl, - DeletedServicesImpl, - ApiManagementOperationsImpl, - ApiManagementServiceSkusImpl, - ApiManagementServiceImpl, - DiagnosticImpl, - EmailTemplateImpl, - GatewayImpl, - GatewayHostnameConfigurationImpl, - GatewayApiImpl, - GatewayCertificateAuthorityImpl, - GroupImpl, - GroupUserImpl, - IdentityProviderImpl, - IssueImpl, - LoggerImpl, - NamedValueImpl, - NetworkStatusImpl, - NotificationImpl, - NotificationRecipientUserImpl, - NotificationRecipientEmailImpl, - OpenIdConnectProviderImpl, - OutboundNetworkDependenciesEndpointsImpl, - PolicyImpl, - PolicyDescriptionImpl, - PolicyFragmentImpl, - PortalConfigImpl, - PortalRevisionImpl, - PortalSettingsImpl, - SignInSettingsImpl, - SignUpSettingsImpl, - DelegationSettingsImpl, - PrivateEndpointConnectionOperationsImpl, - ProductImpl, - ProductApiImpl, - ProductGroupImpl, - ProductSubscriptionsImpl, - ProductPolicyImpl, - ProductWikiImpl, - ProductWikisImpl, - QuotaByCounterKeysImpl, - QuotaByPeriodKeysImpl, - RegionImpl, - ReportsImpl, - GlobalSchemaImpl, - TenantSettingsImpl, - ApiManagementSkusImpl, - SubscriptionImpl, - TagResourceImpl, - TenantAccessImpl, - TenantAccessGitImpl, - TenantConfigurationImpl, - UserImpl, - UserGroupImpl, - UserSubscriptionImpl, - UserIdentitiesImpl, - UserConfirmationPasswordImpl, - DocumentationImpl -} from "./operations"; + ApiManagementClientOptionalParams, + ConnectivityCheckRequest, + PerformConnectivityCheckAsyncOptionalParams, + PerformConnectivityCheckAsyncResponse +} from "./models/index.js"; +import * as Mappers from "./models/mappers.js"; +import * as Parameters from "./models/parameters.js"; import { - Api, - ApiRevision, - ApiRelease, - ApiOperation, - ApiOperationPolicy, - Tag, - GraphQLApiResolver, - GraphQLApiResolverPolicy, - ApiProduct, - ApiPolicy, - ApiSchema, - ApiDiagnostic, - ApiIssue, - ApiIssueComment, - ApiIssueAttachment, - ApiTagDescription, - OperationOperations, - ApiWiki, - ApiWikis, - ApiExport, - ApiVersionSet, - AuthorizationServer, - AuthorizationProvider, - Authorization, - AuthorizationLoginLinks, - AuthorizationAccessPolicy, - Backend, - Cache, - Certificate, - ContentType, - ContentItem, - DeletedServices, - ApiManagementOperations, - ApiManagementServiceSkus, - ApiManagementService, - Diagnostic, - EmailTemplate, - Gateway, - GatewayHostnameConfiguration, - GatewayApi, - GatewayCertificateAuthority, - Group, - GroupUser, - IdentityProvider, - Issue, - Logger, - NamedValue, - NetworkStatus, - Notification, - NotificationRecipientUser, - NotificationRecipientEmail, - OpenIdConnectProvider, - OutboundNetworkDependenciesEndpoints, - Policy, - PolicyDescription, - PolicyFragment, - PortalConfig, - PortalRevision, - PortalSettings, - SignInSettings, - SignUpSettings, - DelegationSettings, - PrivateEndpointConnectionOperations, - Product, - ProductApi, - ProductGroup, - ProductSubscriptions, - ProductPolicy, - ProductWiki, - ProductWikis, - QuotaByCounterKeys, - QuotaByPeriodKeys, - Region, - Reports, - GlobalSchema, - TenantSettings, - ApiManagementSkus, - Subscription, - TagResource, - TenantAccess, - TenantAccessGit, - TenantConfiguration, - User, - UserGroup, - UserSubscription, - UserIdentities, - UserConfirmationPassword, - Documentation -} from "./operationsInterfaces"; -import * as Parameters from "./models/parameters"; -import * as Mappers from "./models/mappers"; + ApiDiagnosticImpl, + ApiExportImpl, + ApiImpl, + ApiIssueAttachmentImpl, + ApiIssueCommentImpl, + ApiIssueImpl, + ApiManagementOperationsImpl, + ApiManagementServiceImpl, + ApiManagementServiceSkusImpl, + ApiManagementSkusImpl, + ApiOperationImpl, + ApiOperationPolicyImpl, + ApiPolicyImpl, + ApiProductImpl, + ApiReleaseImpl, + ApiRevisionImpl, + ApiSchemaImpl, + ApiTagDescriptionImpl, + ApiVersionSetImpl, + ApiWikiImpl, + ApiWikisImpl, + AuthorizationAccessPolicyImpl, + AuthorizationImpl, + AuthorizationLoginLinksImpl, + AuthorizationProviderImpl, + AuthorizationServerImpl, + BackendImpl, + CacheImpl, + CertificateImpl, + ContentItemImpl, + ContentTypeImpl, + DelegationSettingsImpl, + DeletedServicesImpl, + DiagnosticImpl, + DocumentationImpl, + EmailTemplateImpl, + GatewayApiImpl, + GatewayCertificateAuthorityImpl, + GatewayHostnameConfigurationImpl, + GatewayImpl, + GlobalSchemaImpl, + GraphQLApiResolverImpl, + GraphQLApiResolverPolicyImpl, + GroupImpl, + GroupUserImpl, + IdentityProviderImpl, + IssueImpl, + LoggerImpl, + NamedValueImpl, + NetworkStatusImpl, + NotificationImpl, + NotificationRecipientEmailImpl, + NotificationRecipientUserImpl, + OpenIdConnectProviderImpl, + OperationOperationsImpl, + OutboundNetworkDependenciesEndpointsImpl, + PolicyDescriptionImpl, + PolicyFragmentImpl, + PolicyImpl, + PortalConfigImpl, + PortalRevisionImpl, + PortalSettingsImpl, + PrivateEndpointConnectionOperationsImpl, + ProductApiImpl, + ProductGroupImpl, + ProductImpl, + ProductPolicyImpl, + ProductSubscriptionsImpl, + ProductWikiImpl, + ProductWikisImpl, + QuotaByCounterKeysImpl, + QuotaByPeriodKeysImpl, + RegionImpl, + ReportsImpl, + SignInSettingsImpl, + SignUpSettingsImpl, + SubscriptionImpl, + TagImpl, + TagResourceImpl, + TenantAccessGitImpl, + TenantAccessImpl, + TenantConfigurationImpl, + TenantSettingsImpl, + UserConfirmationPasswordImpl, + UserGroupImpl, + UserIdentitiesImpl, + UserImpl, + UserSubscriptionImpl +} from "./operations/index.js"; import { - ApiManagementClientOptionalParams, - ConnectivityCheckRequest, - PerformConnectivityCheckAsyncOptionalParams, - PerformConnectivityCheckAsyncResponse -} from "./models"; + Api, + ApiDiagnostic, + ApiExport, + ApiIssue, + ApiIssueAttachment, + ApiIssueComment, + ApiManagementOperations, + ApiManagementService, + ApiManagementServiceSkus, + ApiManagementSkus, + ApiOperation, + ApiOperationPolicy, + ApiPolicy, + ApiProduct, + ApiRelease, + ApiRevision, + ApiSchema, + ApiTagDescription, + ApiVersionSet, + ApiWiki, + ApiWikis, + Authorization, + AuthorizationAccessPolicy, + AuthorizationLoginLinks, + AuthorizationProvider, + AuthorizationServer, + Backend, + Cache, + Certificate, + ContentItem, + ContentType, + DelegationSettings, + DeletedServices, + Diagnostic, + Documentation, + EmailTemplate, + Gateway, + GatewayApi, + GatewayCertificateAuthority, + GatewayHostnameConfiguration, + GlobalSchema, + GraphQLApiResolver, + GraphQLApiResolverPolicy, + Group, + GroupUser, + IdentityProvider, + Issue, + Logger, + NamedValue, + NetworkStatus, + Notification, + NotificationRecipientEmail, + NotificationRecipientUser, + OpenIdConnectProvider, + OperationOperations, + OutboundNetworkDependenciesEndpoints, + Policy, + PolicyDescription, + PolicyFragment, + PortalConfig, + PortalRevision, + PortalSettings, + PrivateEndpointConnectionOperations, + Product, + ProductApi, + ProductGroup, + ProductPolicy, + ProductSubscriptions, + ProductWiki, + ProductWikis, + QuotaByCounterKeys, + QuotaByPeriodKeys, + Region, + Reports, + SignInSettings, + SignUpSettings, + Subscription, + Tag, + TagResource, + TenantAccess, + TenantAccessGit, + TenantConfiguration, + TenantSettings, + User, + UserConfirmationPassword, + UserGroup, + UserIdentities, + UserSubscription +} from "./operationsInterfaces/index.js"; export class ApiManagementClient extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId?: string; - - /** - * Initializes a new instance of the ApiManagementClient 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?: ApiManagementClientOptionalParams - ); - constructor( - credentials: coreAuth.TokenCredential, - options?: ApiManagementClientOptionalParams - ); - constructor( - credentials: coreAuth.TokenCredential, - subscriptionIdOrOptions?: ApiManagementClientOptionalParams | string, - options?: ApiManagementClientOptionalParams - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } + $host: string; + apiVersion: string; + subscriptionId?: string; - let subscriptionId: string | undefined; + /** + * Initializes a new instance of the ApiManagementClient 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?: ApiManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: ApiManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: ApiManagementClientOptionalParams | string, + options?: ApiManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } - if (typeof subscriptionIdOrOptions === "string") { - subscriptionId = subscriptionIdOrOptions; - } else if (typeof subscriptionIdOrOptions === "object") { - options = subscriptionIdOrOptions; - } + let subscriptionId: string | undefined; - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: ApiManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; + } - const packageDetails = `azsdk-js-arm-apimanagement/9.2.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: ApiManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" - }; - super(optionsWithDefaults); + const packageDetails = `azsdk-js-arm-apimanagement/9.2.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; - 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; + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-08-01"; - this.api = new ApiImpl(this); - this.apiRevision = new ApiRevisionImpl(this); - this.apiRelease = new ApiReleaseImpl(this); - this.apiOperation = new ApiOperationImpl(this); - this.apiOperationPolicy = new ApiOperationPolicyImpl(this); - this.tag = new TagImpl(this); - this.graphQLApiResolver = new GraphQLApiResolverImpl(this); - this.graphQLApiResolverPolicy = new GraphQLApiResolverPolicyImpl(this); - this.apiProduct = new ApiProductImpl(this); - this.apiPolicy = new ApiPolicyImpl(this); - this.apiSchema = new ApiSchemaImpl(this); - this.apiDiagnostic = new ApiDiagnosticImpl(this); - this.apiIssue = new ApiIssueImpl(this); - this.apiIssueComment = new ApiIssueCommentImpl(this); - this.apiIssueAttachment = new ApiIssueAttachmentImpl(this); - this.apiTagDescription = new ApiTagDescriptionImpl(this); - this.operationOperations = new OperationOperationsImpl(this); - this.apiWiki = new ApiWikiImpl(this); - this.apiWikis = new ApiWikisImpl(this); - this.apiExport = new ApiExportImpl(this); - this.apiVersionSet = new ApiVersionSetImpl(this); - this.authorizationServer = new AuthorizationServerImpl(this); - this.authorizationProvider = new AuthorizationProviderImpl(this); - this.authorization = new AuthorizationImpl(this); - this.authorizationLoginLinks = new AuthorizationLoginLinksImpl(this); - this.authorizationAccessPolicy = new AuthorizationAccessPolicyImpl(this); - this.backend = new BackendImpl(this); - this.cache = new CacheImpl(this); - this.certificate = new CertificateImpl(this); - this.contentType = new ContentTypeImpl(this); - this.contentItem = new ContentItemImpl(this); - this.deletedServices = new DeletedServicesImpl(this); - this.apiManagementOperations = new ApiManagementOperationsImpl(this); - this.apiManagementServiceSkus = new ApiManagementServiceSkusImpl(this); - this.apiManagementService = new ApiManagementServiceImpl(this); - this.diagnostic = new DiagnosticImpl(this); - this.emailTemplate = new EmailTemplateImpl(this); - this.gateway = new GatewayImpl(this); - this.gatewayHostnameConfiguration = new GatewayHostnameConfigurationImpl( - this - ); - this.gatewayApi = new GatewayApiImpl(this); - this.gatewayCertificateAuthority = new GatewayCertificateAuthorityImpl( - this - ); - this.group = new GroupImpl(this); - this.groupUser = new GroupUserImpl(this); - this.identityProvider = new IdentityProviderImpl(this); - this.issue = new IssueImpl(this); - this.logger = new LoggerImpl(this); - this.namedValue = new NamedValueImpl(this); - this.networkStatus = new NetworkStatusImpl(this); - this.notification = new NotificationImpl(this); - this.notificationRecipientUser = new NotificationRecipientUserImpl(this); - this.notificationRecipientEmail = new NotificationRecipientEmailImpl(this); - this.openIdConnectProvider = new OpenIdConnectProviderImpl(this); - this.outboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsImpl( - this - ); - this.policy = new PolicyImpl(this); - this.policyDescription = new PolicyDescriptionImpl(this); - this.policyFragment = new PolicyFragmentImpl(this); - this.portalConfig = new PortalConfigImpl(this); - this.portalRevision = new PortalRevisionImpl(this); - this.portalSettings = new PortalSettingsImpl(this); - this.signInSettings = new SignInSettingsImpl(this); - this.signUpSettings = new SignUpSettingsImpl(this); - this.delegationSettings = new DelegationSettingsImpl(this); - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( - this - ); - this.product = new ProductImpl(this); - this.productApi = new ProductApiImpl(this); - this.productGroup = new ProductGroupImpl(this); - this.productSubscriptions = new ProductSubscriptionsImpl(this); - this.productPolicy = new ProductPolicyImpl(this); - this.productWiki = new ProductWikiImpl(this); - this.productWikis = new ProductWikisImpl(this); - this.quotaByCounterKeys = new QuotaByCounterKeysImpl(this); - this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); - this.region = new RegionImpl(this); - this.reports = new ReportsImpl(this); - this.globalSchema = new GlobalSchemaImpl(this); - this.tenantSettings = new TenantSettingsImpl(this); - this.apiManagementSkus = new ApiManagementSkusImpl(this); - this.subscription = new SubscriptionImpl(this); - this.tagResource = new TagResourceImpl(this); - this.tenantAccess = new TenantAccessImpl(this); - this.tenantAccessGit = new TenantAccessGitImpl(this); - this.tenantConfiguration = new TenantConfigurationImpl(this); - this.user = new UserImpl(this); - this.userGroup = new UserGroupImpl(this); - this.userSubscription = new UserSubscriptionImpl(this); - this.userIdentities = new UserIdentitiesImpl(this); - this.userConfirmationPassword = new UserConfirmationPasswordImpl(this); - this.documentation = new DocumentationImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } + 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; - /** 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; + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2022-08-01"; + this.api = new ApiImpl(this); + this.apiRevision = new ApiRevisionImpl(this); + this.apiRelease = new ApiReleaseImpl(this); + this.apiOperation = new ApiOperationImpl(this); + this.apiOperationPolicy = new ApiOperationPolicyImpl(this); + this.tag = new TagImpl(this); + this.graphQLApiResolver = new GraphQLApiResolverImpl(this); + this.graphQLApiResolverPolicy = new GraphQLApiResolverPolicyImpl(this); + this.apiProduct = new ApiProductImpl(this); + this.apiPolicy = new ApiPolicyImpl(this); + this.apiSchema = new ApiSchemaImpl(this); + this.apiDiagnostic = new ApiDiagnosticImpl(this); + this.apiIssue = new ApiIssueImpl(this); + this.apiIssueComment = new ApiIssueCommentImpl(this); + this.apiIssueAttachment = new ApiIssueAttachmentImpl(this); + this.apiTagDescription = new ApiTagDescriptionImpl(this); + this.operationOperations = new OperationOperationsImpl(this); + this.apiWiki = new ApiWikiImpl(this); + this.apiWikis = new ApiWikisImpl(this); + this.apiExport = new ApiExportImpl(this); + this.apiVersionSet = new ApiVersionSetImpl(this); + this.authorizationServer = new AuthorizationServerImpl(this); + this.authorizationProvider = new AuthorizationProviderImpl(this); + this.authorization = new AuthorizationImpl(this); + this.authorizationLoginLinks = new AuthorizationLoginLinksImpl(this); + this.authorizationAccessPolicy = new AuthorizationAccessPolicyImpl(this); + this.backend = new BackendImpl(this); + this.cache = new CacheImpl(this); + this.certificate = new CertificateImpl(this); + this.contentType = new ContentTypeImpl(this); + this.contentItem = new ContentItemImpl(this); + this.deletedServices = new DeletedServicesImpl(this); + this.apiManagementOperations = new ApiManagementOperationsImpl(this); + this.apiManagementServiceSkus = new ApiManagementServiceSkusImpl(this); + this.apiManagementService = new ApiManagementServiceImpl(this); + this.diagnostic = new DiagnosticImpl(this); + this.emailTemplate = new EmailTemplateImpl(this); + this.gateway = new GatewayImpl(this); + this.gatewayHostnameConfiguration = new GatewayHostnameConfigurationImpl( + this + ); + this.gatewayApi = new GatewayApiImpl(this); + this.gatewayCertificateAuthority = new GatewayCertificateAuthorityImpl( + this + ); + this.group = new GroupImpl(this); + this.groupUser = new GroupUserImpl(this); + this.identityProvider = new IdentityProviderImpl(this); + this.issue = new IssueImpl(this); + this.logger = new LoggerImpl(this); + this.namedValue = new NamedValueImpl(this); + this.networkStatus = new NetworkStatusImpl(this); + this.notification = new NotificationImpl(this); + this.notificationRecipientUser = new NotificationRecipientUserImpl(this); + this.notificationRecipientEmail = new NotificationRecipientEmailImpl(this); + this.openIdConnectProvider = new OpenIdConnectProviderImpl(this); + this.outboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsImpl( + this + ); + this.policy = new PolicyImpl(this); + this.policyDescription = new PolicyDescriptionImpl(this); + this.policyFragment = new PolicyFragmentImpl(this); + this.portalConfig = new PortalConfigImpl(this); + this.portalRevision = new PortalRevisionImpl(this); + this.portalSettings = new PortalSettingsImpl(this); + this.signInSettings = new SignInSettingsImpl(this); + this.signUpSettings = new SignUpSettingsImpl(this); + this.delegationSettings = new DelegationSettingsImpl(this); + this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( + this + ); + this.product = new ProductImpl(this); + this.productApi = new ProductApiImpl(this); + this.productGroup = new ProductGroupImpl(this); + this.productSubscriptions = new ProductSubscriptionsImpl(this); + this.productPolicy = new ProductPolicyImpl(this); + this.productWiki = new ProductWikiImpl(this); + this.productWikis = new ProductWikisImpl(this); + this.quotaByCounterKeys = new QuotaByCounterKeysImpl(this); + this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); + this.region = new RegionImpl(this); + this.reports = new ReportsImpl(this); + this.globalSchema = new GlobalSchemaImpl(this); + this.tenantSettings = new TenantSettingsImpl(this); + this.apiManagementSkus = new ApiManagementSkusImpl(this); + this.subscription = new SubscriptionImpl(this); + this.tagResource = new TagResourceImpl(this); + this.tenantAccess = new TenantAccessImpl(this); + this.tenantAccessGit = new TenantAccessGitImpl(this); + this.tenantConfiguration = new TenantConfigurationImpl(this); + this.user = new UserImpl(this); + this.userGroup = new UserGroupImpl(this); + this.userSubscription = new UserSubscriptionImpl(this); + this.userIdentities = new UserIdentitiesImpl(this); + this.userConfirmationPassword = new UserConfirmationPasswordImpl(this); + this.documentation = new DocumentationImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); } - 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); - } - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsync( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PerformConnectivityCheckAsyncResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.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() + /** 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); + } - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options - }, - spec: performConnectivityCheckAsyncOperationSpec - }); - const poller = await createHttpPoller< - PerformConnectivityCheckAsyncResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Performs a connectivity check between the API Management service and a given destination, and + * returns metrics for the connection, as well as errors encountered while trying to establish it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param connectivityCheckRequestParams Connectivity Check request parameters. + * @param options The options parameters. + */ + async beginPerformConnectivityCheckAsync( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: PerformConnectivityCheckAsyncOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PerformConnectivityCheckAsyncResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.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() + } + }; + }; - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams - ): Promise { - const poller = await this.beginPerformConnectivityCheckAsync( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options - ); - return poller.pollUntilDone(); - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options + }, + spec: performConnectivityCheckAsyncOperationSpec + }); + const poller = await createHttpPoller< + PerformConnectivityCheckAsyncResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - api: Api; - apiRevision: ApiRevision; - apiRelease: ApiRelease; - apiOperation: ApiOperation; - apiOperationPolicy: ApiOperationPolicy; - tag: Tag; - graphQLApiResolver: GraphQLApiResolver; - graphQLApiResolverPolicy: GraphQLApiResolverPolicy; - apiProduct: ApiProduct; - apiPolicy: ApiPolicy; - apiSchema: ApiSchema; - apiDiagnostic: ApiDiagnostic; - apiIssue: ApiIssue; - apiIssueComment: ApiIssueComment; - apiIssueAttachment: ApiIssueAttachment; - apiTagDescription: ApiTagDescription; - operationOperations: OperationOperations; - apiWiki: ApiWiki; - apiWikis: ApiWikis; - apiExport: ApiExport; - apiVersionSet: ApiVersionSet; - authorizationServer: AuthorizationServer; - authorizationProvider: AuthorizationProvider; - authorization: Authorization; - authorizationLoginLinks: AuthorizationLoginLinks; - authorizationAccessPolicy: AuthorizationAccessPolicy; - backend: Backend; - cache: Cache; - certificate: Certificate; - contentType: ContentType; - contentItem: ContentItem; - deletedServices: DeletedServices; - apiManagementOperations: ApiManagementOperations; - apiManagementServiceSkus: ApiManagementServiceSkus; - apiManagementService: ApiManagementService; - diagnostic: Diagnostic; - emailTemplate: EmailTemplate; - gateway: Gateway; - gatewayHostnameConfiguration: GatewayHostnameConfiguration; - gatewayApi: GatewayApi; - gatewayCertificateAuthority: GatewayCertificateAuthority; - group: Group; - groupUser: GroupUser; - identityProvider: IdentityProvider; - issue: Issue; - logger: Logger; - namedValue: NamedValue; - networkStatus: NetworkStatus; - notification: Notification; - notificationRecipientUser: NotificationRecipientUser; - notificationRecipientEmail: NotificationRecipientEmail; - openIdConnectProvider: OpenIdConnectProvider; - outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; - policy: Policy; - policyDescription: PolicyDescription; - policyFragment: PolicyFragment; - portalConfig: PortalConfig; - portalRevision: PortalRevision; - portalSettings: PortalSettings; - signInSettings: SignInSettings; - signUpSettings: SignUpSettings; - delegationSettings: DelegationSettings; - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - product: Product; - productApi: ProductApi; - productGroup: ProductGroup; - productSubscriptions: ProductSubscriptions; - productPolicy: ProductPolicy; - productWiki: ProductWiki; - productWikis: ProductWikis; - quotaByCounterKeys: QuotaByCounterKeys; - quotaByPeriodKeys: QuotaByPeriodKeys; - region: Region; - reports: Reports; - globalSchema: GlobalSchema; - tenantSettings: TenantSettings; - apiManagementSkus: ApiManagementSkus; - subscription: Subscription; - tagResource: TagResource; - tenantAccess: TenantAccess; - tenantAccessGit: TenantAccessGit; - tenantConfiguration: TenantConfiguration; - user: User; - userGroup: UserGroup; - userSubscription: UserSubscription; - userIdentities: UserIdentities; - userConfirmationPassword: UserConfirmationPassword; - documentation: Documentation; + /** + * Performs a connectivity check between the API Management service and a given destination, and + * returns metrics for the connection, as well as errors encountered while trying to establish it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param connectivityCheckRequestParams Connectivity Check request parameters. + * @param options The options parameters. + */ + async beginPerformConnectivityCheckAsyncAndWait( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: PerformConnectivityCheckAsyncOptionalParams + ): Promise { + const poller = await this.beginPerformConnectivityCheckAsync( + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options + ); + return poller.pollUntilDone(); + } + + api: Api; + apiRevision: ApiRevision; + apiRelease: ApiRelease; + apiOperation: ApiOperation; + apiOperationPolicy: ApiOperationPolicy; + tag: Tag; + graphQLApiResolver: GraphQLApiResolver; + graphQLApiResolverPolicy: GraphQLApiResolverPolicy; + apiProduct: ApiProduct; + apiPolicy: ApiPolicy; + apiSchema: ApiSchema; + apiDiagnostic: ApiDiagnostic; + apiIssue: ApiIssue; + apiIssueComment: ApiIssueComment; + apiIssueAttachment: ApiIssueAttachment; + apiTagDescription: ApiTagDescription; + operationOperations: OperationOperations; + apiWiki: ApiWiki; + apiWikis: ApiWikis; + apiExport: ApiExport; + apiVersionSet: ApiVersionSet; + authorizationServer: AuthorizationServer; + authorizationProvider: AuthorizationProvider; + authorization: Authorization; + authorizationLoginLinks: AuthorizationLoginLinks; + authorizationAccessPolicy: AuthorizationAccessPolicy; + backend: Backend; + cache: Cache; + certificate: Certificate; + contentType: ContentType; + contentItem: ContentItem; + deletedServices: DeletedServices; + apiManagementOperations: ApiManagementOperations; + apiManagementServiceSkus: ApiManagementServiceSkus; + apiManagementService: ApiManagementService; + diagnostic: Diagnostic; + emailTemplate: EmailTemplate; + gateway: Gateway; + gatewayHostnameConfiguration: GatewayHostnameConfiguration; + gatewayApi: GatewayApi; + gatewayCertificateAuthority: GatewayCertificateAuthority; + group: Group; + groupUser: GroupUser; + identityProvider: IdentityProvider; + issue: Issue; + logger: Logger; + namedValue: NamedValue; + networkStatus: NetworkStatus; + notification: Notification; + notificationRecipientUser: NotificationRecipientUser; + notificationRecipientEmail: NotificationRecipientEmail; + openIdConnectProvider: OpenIdConnectProvider; + outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; + policy: Policy; + policyDescription: PolicyDescription; + policyFragment: PolicyFragment; + portalConfig: PortalConfig; + portalRevision: PortalRevision; + portalSettings: PortalSettings; + signInSettings: SignInSettings; + signUpSettings: SignUpSettings; + delegationSettings: DelegationSettings; + privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; + product: Product; + productApi: ProductApi; + productGroup: ProductGroup; + productSubscriptions: ProductSubscriptions; + productPolicy: ProductPolicy; + productWiki: ProductWiki; + productWikis: ProductWikis; + quotaByCounterKeys: QuotaByCounterKeys; + quotaByPeriodKeys: QuotaByPeriodKeys; + region: Region; + reports: Reports; + globalSchema: GlobalSchema; + tenantSettings: TenantSettings; + apiManagementSkus: ApiManagementSkus; + subscription: Subscription; + tagResource: TagResource; + tenantAccess: TenantAccess; + tenantAccessGit: TenantAccessGit; + tenantConfiguration: TenantConfiguration; + user: User; + userGroup: UserGroup; + userSubscription: UserSubscription; + userIdentities: UserIdentities; + userConfirmationPassword: UserConfirmationPassword; + documentation: Documentation; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const performConnectivityCheckAsyncOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 201: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 202: { - bodyMapper: Mappers.ConnectivityCheckResponse - }, - 204: { - bodyMapper: Mappers.ConnectivityCheckResponse + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 201: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 202: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + 204: { + bodyMapper: Mappers.ConnectivityCheckResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.connectivityCheckRequestParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.connectivityCheckRequestParams, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/index.ts b/sdk/apimanagement/arm-apimanagement/src/index.ts index 0ed3812dab81..54a2cedd4a7c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { ApiManagementClient } from "./apiManagementClient"; -export * from "./operationsInterfaces"; +export { ApiManagementClient } from "./apiManagementClient.js"; +export * from "./models/index.js"; +export * from "./operationsInterfaces/index.js"; +export { getContinuationToken } from "./pagingHelper.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts b/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts index 52f6eaacfb83..2be96362d231 100644 --- a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts +++ b/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts @@ -13,30 +13,30 @@ 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; + 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 - }); - } - }; + 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/apimanagement/arm-apimanagement/src/models/index.ts b/sdk/apimanagement/arm-apimanagement/src/models/index.ts index 4e69c371d1f3..8d6d436923f5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/index.ts @@ -10,5963 +10,5963 @@ import * as coreClient from "@azure/core-client"; /** Paged API list representation. */ export interface ApiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** An API Version Set contains the common configuration for a set of API Versions relating */ export interface ApiVersionSetContractDetails { - /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ - id?: string; - /** The display Name of the API Version Set. */ - name?: string; - /** Description of API Version Set. */ - description?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; + /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ + id?: string; + /** The display Name of the API Version Set. */ + name?: string; + /** Description of API Version Set. */ + description?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; } /** API base contract details. */ export interface ApiEntityBaseContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; } /** API Authentication Settings. */ export interface AuthenticationSettingsContract { - /** OAuth2 Authentication settings */ - oAuth2?: OAuth2AuthenticationSettingsContract; - /** OpenID Connect Authentication Settings */ - openid?: OpenIdAuthenticationSettingsContract; - /** Collection of OAuth2 authentication settings included into this API. */ - oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; - /** Collection of Open ID Connect authentication settings included into this API. */ - openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; + /** OAuth2 Authentication settings */ + oAuth2?: OAuth2AuthenticationSettingsContract; + /** OpenID Connect Authentication Settings */ + openid?: OpenIdAuthenticationSettingsContract; + /** Collection of OAuth2 authentication settings included into this API. */ + oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; + /** Collection of Open ID Connect authentication settings included into this API. */ + openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; } /** API OAuth2 Authentication settings details. */ export interface OAuth2AuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - authorizationServerId?: string; - /** operations scope. */ - scope?: string; + /** OAuth authorization server identifier. */ + authorizationServerId?: string; + /** operations scope. */ + scope?: string; } /** API OAuth2 Authentication settings details. */ export interface OpenIdAuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - openidProviderId?: string; - /** How to send token to the server. */ - bearerTokenSendingMethods?: BearerTokenSendingMethods[]; + /** OAuth authorization server identifier. */ + openidProviderId?: string; + /** How to send token to the server. */ + bearerTokenSendingMethods?: BearerTokenSendingMethods[]; } /** Subscription key parameter names details. */ export interface SubscriptionKeyParameterNamesContract { - /** Subscription key header name. */ - header?: string; - /** Subscription key query string parameter name. */ - query?: string; + /** Subscription key header name. */ + header?: string; + /** Subscription key query string parameter name. */ + query?: string; } /** API contact information */ export interface ApiContactInformation { - /** The identifying name of the contact person/organization */ - name?: string; - /** The URL pointing to the contact information. MUST be in the format of a URL */ - url?: string; - /** The email address of the contact person/organization. MUST be in the format of an email address */ - email?: string; + /** The identifying name of the contact person/organization */ + name?: string; + /** The URL pointing to the contact information. MUST be in the format of a URL */ + url?: string; + /** The email address of the contact person/organization. MUST be in the format of an email address */ + email?: string; } /** API license information */ export interface ApiLicenseInformation { - /** The license name used for the API */ - name?: string; - /** A URL to the license used for the API. MUST be in the format of a URL */ - url?: string; + /** The license name used for the API */ + name?: string; + /** A URL to the license used for the API. MUST be in the format of a URL */ + url?: 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; + /** + * 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; } /** Error Response. */ export interface ErrorResponse { - /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ - code?: string; - /** Human-readable representation of the error. */ - message?: string; - /** The list of invalid fields send in request, in case of validation error. */ - details?: ErrorFieldContract[]; + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; } /** Error Body contract. */ export interface ErrorResponseBody { - /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ - code?: string; - /** Human-readable representation of the error. */ - message?: string; - /** The list of invalid fields send in request, in case of validation error. */ - details?: ErrorFieldContract[]; + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; } /** Error Field contract. */ export interface ErrorFieldContract { - /** Property level error code. */ - code?: string; - /** Human-readable representation of property-level error. */ - message?: string; - /** Property name. */ - target?: string; + /** Property level error code. */ + code?: string; + /** Human-readable representation of property-level error. */ + message?: string; + /** Property name. */ + target?: string; } /** API Create or Update Parameters. */ export interface ApiCreateOrUpdateParameter { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; } /** Criteria to limit import of WSDL to a subset of the document. */ export interface ApiCreateOrUpdatePropertiesWsdlSelector { - /** Name of service to import from WSDL */ - wsdlServiceName?: string; - /** Name of endpoint(port) to import from WSDL */ - wsdlEndpointName?: string; + /** Name of service to import from WSDL */ + wsdlServiceName?: string; + /** Name of endpoint(port) to import from WSDL */ + wsdlEndpointName?: string; } /** API update contract details. */ export interface ApiUpdateContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** Paged API Revision list representation. */ export interface ApiRevisionCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiRevisionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiRevisionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Summary of revision metadata. */ export interface ApiRevisionContract { - /** - * Identifier of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiId?: string; - /** - * Revision number of API. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** - * Description of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Gateway URL for accessing the non-current API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateUrl?: string; - /** - * Indicates if API revision is the current api revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isCurrent?: boolean; + /** + * Identifier of the API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiId?: string; + /** + * Revision number of API. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiRevision?: string; + /** + * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; + /** + * Description of the API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Gateway URL for accessing the non-current API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateUrl?: string; + /** + * Indicates if API revision is the current api revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCurrent?: boolean; } /** Paged ApiRelease list representation. */ export interface ApiReleaseCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiReleaseContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiReleaseContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Operation list representation. */ export interface OperationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: OperationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: OperationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** API Operation Entity Base Contract details. */ export interface OperationEntityBaseContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; } /** Operation parameters details. */ export interface ParameterContract { - /** Parameter name. */ - name: string; - /** Parameter description. */ - description?: string; - /** Parameter type. */ - type: string; - /** Default parameter value. */ - defaultValue?: string; - /** Specifies whether parameter is required or not. */ - required?: boolean; - /** Parameter values. */ - values?: string[]; - /** Schema identifier. */ - schemaId?: string; - /** Type name defined by the schema. */ - typeName?: string; - /** Exampled defined for the parameter. */ - examples?: { [propertyName: string]: ParameterExampleContract }; + /** Parameter name. */ + name: string; + /** Parameter description. */ + description?: string; + /** Parameter type. */ + type: string; + /** Default parameter value. */ + defaultValue?: string; + /** Specifies whether parameter is required or not. */ + required?: boolean; + /** Parameter values. */ + values?: string[]; + /** Schema identifier. */ + schemaId?: string; + /** Type name defined by the schema. */ + typeName?: string; + /** Exampled defined for the parameter. */ + examples?: { [propertyName: string]: ParameterExampleContract }; } /** Parameter example. */ export interface ParameterExampleContract { - /** Short description for the example */ - summary?: string; - /** Long description for the example */ - description?: string; - /** Example value. May be a primitive value, or an object. */ - value?: any; - /** A URL that points to the literal example */ - externalValue?: string; + /** Short description for the example */ + summary?: string; + /** Long description for the example */ + description?: string; + /** Example value. May be a primitive value, or an object. */ + value?: any; + /** A URL that points to the literal example */ + externalValue?: string; } /** Operation request details. */ export interface RequestContract { - /** Operation request description. */ - description?: string; - /** Collection of operation request query parameters. */ - queryParameters?: ParameterContract[]; - /** Collection of operation request headers. */ - headers?: ParameterContract[]; - /** Collection of operation request representations. */ - representations?: RepresentationContract[]; + /** Operation request description. */ + description?: string; + /** Collection of operation request query parameters. */ + queryParameters?: ParameterContract[]; + /** Collection of operation request headers. */ + headers?: ParameterContract[]; + /** Collection of operation request representations. */ + representations?: RepresentationContract[]; } /** Operation request/response representation details. */ export interface RepresentationContract { - /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ - contentType: string; - /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - schemaId?: string; - /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - typeName?: string; - /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ - formParameters?: ParameterContract[]; - /** Exampled defined for the representation. */ - examples?: { [propertyName: string]: ParameterExampleContract }; + /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ + contentType: string; + /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + schemaId?: string; + /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + typeName?: string; + /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ + formParameters?: ParameterContract[]; + /** Exampled defined for the representation. */ + examples?: { [propertyName: string]: ParameterExampleContract }; } /** Operation response details. */ export interface ResponseContract { - /** Operation response HTTP status code. */ - statusCode: number; - /** Operation response description. */ - description?: string; - /** Collection of operation response representations. */ - representations?: RepresentationContract[]; - /** Collection of operation response headers. */ - headers?: ParameterContract[]; + /** Operation response HTTP status code. */ + statusCode: number; + /** Operation response description. */ + description?: string; + /** Collection of operation response representations. */ + representations?: RepresentationContract[]; + /** Collection of operation response headers. */ + headers?: ParameterContract[]; } /** API Operation Update Contract details. */ export interface OperationUpdateContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** The response of the list policy operation. */ export interface PolicyCollection { - /** Policy Contract value. */ - value?: PolicyContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Policy Contract value. */ + value?: PolicyContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Tag list representation. */ export interface TagCollection { - /** Page values. */ - value?: TagContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Resolver list representation. */ export interface ResolverCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ResolverContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ResolverContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** GraphQL API Resolver Update Contract details. */ export interface ResolverUpdateContract { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; } /** Paged Products list representation. */ export interface ProductCollection { - /** Page values. */ - value?: ProductContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ProductContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Product Entity Base Parameters */ export interface ProductEntityBaseParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; } /** The response of the list schema operation. */ export interface SchemaCollection { - /** - * API Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: SchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * API Schema Contract value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SchemaContract[]; + /** Total record count number. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Diagnostic list representation. */ export interface DiagnosticCollection { - /** Page values. */ - value?: DiagnosticContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: DiagnosticContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Sampling settings for Diagnostic. */ export interface SamplingSettings { - /** Sampling type. */ - samplingType?: SamplingType; - /** Rate of sampling for fixed-rate sampling. */ - percentage?: number; + /** Sampling type. */ + samplingType?: SamplingType; + /** Rate of sampling for fixed-rate sampling. */ + percentage?: number; } /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ export interface PipelineDiagnosticSettings { - /** Diagnostic settings for request. */ - request?: HttpMessageDiagnostic; - /** Diagnostic settings for response. */ - response?: HttpMessageDiagnostic; + /** Diagnostic settings for request. */ + request?: HttpMessageDiagnostic; + /** Diagnostic settings for response. */ + response?: HttpMessageDiagnostic; } /** Http message diagnostic settings. */ export interface HttpMessageDiagnostic { - /** Array of HTTP Headers to log. */ - headers?: string[]; - /** Body logging settings. */ - body?: BodyDiagnosticSettings; - /** Data masking settings. */ - dataMasking?: DataMasking; + /** Array of HTTP Headers to log. */ + headers?: string[]; + /** Body logging settings. */ + body?: BodyDiagnosticSettings; + /** Data masking settings. */ + dataMasking?: DataMasking; } /** Body logging settings. */ export interface BodyDiagnosticSettings { - /** Number of request body bytes to log. */ - bytes?: number; + /** Number of request body bytes to log. */ + bytes?: number; } export interface DataMasking { - /** Masking settings for Url query parameters */ - queryParams?: DataMaskingEntity[]; - /** Masking settings for headers */ - headers?: DataMaskingEntity[]; + /** Masking settings for Url query parameters */ + queryParams?: DataMaskingEntity[]; + /** Masking settings for headers */ + headers?: DataMaskingEntity[]; } export interface DataMaskingEntity { - /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ - value?: string; - /** Data masking mode. */ - mode?: DataMaskingMode; + /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ + value?: string; + /** Data masking mode. */ + mode?: DataMaskingMode; } /** Paged Issue list representation. */ export interface IssueCollection { - /** - * Issue values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Issue contract Base Properties. */ export interface IssueContractBaseProperties { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; } /** Issue update Parameters. */ export interface IssueUpdateContract { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** Paged Issue Comment list representation. */ export interface IssueCommentCollection { - /** - * Issue Comment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueCommentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue Comment values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueCommentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Issue Attachment list representation. */ export interface IssueAttachmentCollection { - /** - * Issue Attachment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueAttachmentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Issue Attachment values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: IssueAttachmentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged TagDescription list representation. */ export interface TagDescriptionCollection { - /** Page values. */ - value?: TagDescriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagDescriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Parameters supplied to the Create TagDescription operation. */ export interface TagDescriptionBaseProperties { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; } /** Parameters supplied to the Create TagDescription operation. */ export interface TagDescriptionCreateParameters { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; } /** Paged Tag list representation. */ export interface TagResourceCollection { - /** Page values. */ - value?: TagResourceContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: TagResourceContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** TagResource contract properties. */ export interface TagResourceContract { - /** Tag associated with the resource. */ - tag: TagResourceContractProperties; - /** API associated with the tag. */ - api?: ApiTagResourceContractProperties; - /** Operation associated with the tag. */ - operation?: OperationTagResourceContractProperties; - /** Product associated with the tag. */ - product?: ProductTagResourceContractProperties; + /** Tag associated with the resource. */ + tag: TagResourceContractProperties; + /** API associated with the tag. */ + api?: ApiTagResourceContractProperties; + /** Operation associated with the tag. */ + operation?: OperationTagResourceContractProperties; + /** Product associated with the tag. */ + product?: ProductTagResourceContractProperties; } /** Contract defining the Tag property in the Tag Resource Contract */ export interface TagResourceContractProperties { - /** Tag identifier */ - id?: string; - /** Tag Name */ - name?: string; + /** Tag identifier */ + id?: string; + /** Tag Name */ + name?: string; } /** Operation Entity contract Properties. */ export interface OperationTagResourceContractProperties { - /** Identifier of the operation in form /operations/{operationId}. */ - id?: string; - /** - * Operation name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * API Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiName?: string; - /** - * API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * API Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersion?: string; - /** - * Operation Description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly method?: string; - /** - * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly urlTemplate?: string; + /** Identifier of the operation in form /operations/{operationId}. */ + id?: string; + /** + * Operation name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * API Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiName?: string; + /** + * API Revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiRevision?: string; + /** + * API Version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiVersion?: string; + /** + * Operation Description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly method?: string; + /** + * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly urlTemplate?: string; } /** Wiki documentation details. */ export interface WikiDocumentationContract { - /** Documentation Identifier */ - documentationId?: string; + /** Documentation Identifier */ + documentationId?: string; } /** Wiki update contract details. */ export interface WikiUpdateContract { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; } /** Paged Wiki list representation. */ export interface WikiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: WikiContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: WikiContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** API Export result. */ export interface ApiExportResult { - /** ResourceId of the API which was exported. */ - id?: string; - /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ - exportResultFormat?: ExportResultFormat; - /** The object defining the schema of the exported API Detail */ - value?: ApiExportResultValue; + /** ResourceId of the API which was exported. */ + id?: string; + /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ + exportResultFormat?: ExportResultFormat; + /** The object defining the schema of the exported API Detail */ + value?: ApiExportResultValue; } /** The object defining the schema of the exported API Detail */ export interface ApiExportResultValue { - /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ - link?: string; + /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ + link?: string; } /** Paged API Version Set list representation. */ export interface ApiVersionSetCollection { - /** Page values. */ - value?: ApiVersionSetContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ApiVersionSetContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** API Version set base parameters */ export interface ApiVersionSetEntityBase { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; } /** Parameters to update or create an API Version Set Contract. */ export interface ApiVersionSetUpdateParameters { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** Paged OAuth2 Authorization Servers list representation. */ export interface AuthorizationServerCollection { - /** Page values. */ - value?: AuthorizationServerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationServerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** External OAuth authorization server Update settings contract. */ export interface AuthorizationServerContractBaseProperties { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; } /** OAuth acquire token request body parameter (www-url-form-encoded). */ export interface TokenBodyParameterContract { - /** body parameter name. */ - name: string; - /** body parameter value. */ - value: string; + /** body parameter name. */ + name: string; + /** body parameter value. */ + value: string; } /** OAuth Server Secrets Contract. */ export interface AuthorizationServerSecretsContract { - /** oAuth Authorization Server Secrets. */ - clientSecret?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; + /** oAuth Authorization Server Secrets. */ + clientSecret?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; } /** Paged Authorization Provider list representation. */ export interface AuthorizationProviderCollection { - /** Page values. */ - value?: AuthorizationProviderContract[]; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationProviderContract[]; + /** Next page link if any. */ + nextLink?: string; } /** OAuth2 settings details */ export interface AuthorizationProviderOAuth2Settings { - /** Redirect URL to be set in the OAuth application. */ - redirectUrl?: string; - /** OAuth2 settings */ - grantTypes?: AuthorizationProviderOAuth2GrantTypes; + /** Redirect URL to be set in the OAuth application. */ + redirectUrl?: string; + /** OAuth2 settings */ + grantTypes?: AuthorizationProviderOAuth2GrantTypes; } /** Authorization Provider oauth2 grant types settings */ export interface AuthorizationProviderOAuth2GrantTypes { - /** OAuth2 authorization code grant parameters */ - authorizationCode?: { [propertyName: string]: string }; - /** OAuth2 client credential grant parameters */ - clientCredentials?: { [propertyName: string]: string }; + /** OAuth2 authorization code grant parameters */ + authorizationCode?: { [propertyName: string]: string }; + /** OAuth2 client credential grant parameters */ + clientCredentials?: { [propertyName: string]: string }; } /** Paged Authorization list representation. */ export interface AuthorizationCollection { - /** Page values. */ - value?: AuthorizationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Authorization error details. */ export interface AuthorizationError { - /** Error code */ - code?: string; - /** Error message */ - message?: string; + /** Error code */ + code?: string; + /** Error message */ + message?: string; } /** Authorization login request contract. */ export interface AuthorizationLoginRequestContract { - /** The redirect URL after login has completed. */ - postLoginRedirectUrl?: string; + /** The redirect URL after login has completed. */ + postLoginRedirectUrl?: string; } /** Authorization login response contract. */ export interface AuthorizationLoginResponseContract { - /** The login link */ - loginLink?: string; + /** The login link */ + loginLink?: string; } /** Authorization confirm consent code request contract. */ export interface AuthorizationConfirmConsentCodeRequestContract { - /** The consent code from the authorization server after authorizing and consenting. */ - consentCode?: string; + /** The consent code from the authorization server after authorizing and consenting. */ + consentCode?: string; } /** Paged Authorization Access Policy list representation. */ export interface AuthorizationAccessPolicyCollection { - /** Page values. */ - value?: AuthorizationAccessPolicyContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: AuthorizationAccessPolicyContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Backend list representation. */ export interface BackendCollection { - /** Backend values. */ - value?: BackendContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Backend values. */ + value?: BackendContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Backend entity base Parameter set. */ export interface BackendBaseParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; } /** Properties specific to the Backend Type. */ export interface BackendProperties { - /** Backend Service Fabric Cluster Properties */ - serviceFabricCluster?: BackendServiceFabricClusterProperties; + /** Backend Service Fabric Cluster Properties */ + serviceFabricCluster?: BackendServiceFabricClusterProperties; } /** Properties of the Service Fabric Type Backend. */ export interface BackendServiceFabricClusterProperties { - /** The client certificate id for the management endpoint. */ - clientCertificateId?: string; - /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ - clientCertificatethumbprint?: string; - /** Maximum number of retries while attempting resolve the partition. */ - maxPartitionResolutionRetries?: number; - /** The cluster management endpoint. */ - managementEndpoints: string[]; - /** Thumbprints of certificates cluster management service uses for tls communication */ - serverCertificateThumbprints?: string[]; - /** Server X509 Certificate Names Collection */ - serverX509Names?: X509CertificateName[]; + /** The client certificate id for the management endpoint. */ + clientCertificateId?: string; + /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ + clientCertificatethumbprint?: string; + /** Maximum number of retries while attempting resolve the partition. */ + maxPartitionResolutionRetries?: number; + /** The cluster management endpoint. */ + managementEndpoints: string[]; + /** Thumbprints of certificates cluster management service uses for tls communication */ + serverCertificateThumbprints?: string[]; + /** Server X509 Certificate Names Collection */ + serverX509Names?: X509CertificateName[]; } /** Properties of server X509Names. */ export interface X509CertificateName { - /** Common Name of the Certificate. */ - name?: string; - /** Thumbprint for the Issuer of the Certificate. */ - issuerCertificateThumbprint?: string; + /** Common Name of the Certificate. */ + name?: string; + /** Thumbprint for the Issuer of the Certificate. */ + issuerCertificateThumbprint?: string; } /** Details of the Credentials used to connect to Backend. */ export interface BackendCredentialsContract { - /** List of Client Certificate Ids. */ - certificateIds?: string[]; - /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ - certificate?: string[]; - /** Query Parameter description. */ - query?: { [propertyName: string]: string[] }; - /** Header Parameter description. */ - header?: { [propertyName: string]: string[] }; - /** Authorization header authentication */ - authorization?: BackendAuthorizationHeaderCredentials; + /** List of Client Certificate Ids. */ + certificateIds?: string[]; + /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ + certificate?: string[]; + /** Query Parameter description. */ + query?: { [propertyName: string]: string[] }; + /** Header Parameter description. */ + header?: { [propertyName: string]: string[] }; + /** Authorization header authentication */ + authorization?: BackendAuthorizationHeaderCredentials; } /** Authorization header information. */ export interface BackendAuthorizationHeaderCredentials { - /** Authentication Scheme name. */ - scheme: string; - /** Authentication Parameter value. */ - parameter: string; + /** Authentication Scheme name. */ + scheme: string; + /** Authentication Parameter value. */ + parameter: string; } /** Details of the Backend WebProxy Server to use in the Request to Backend. */ export interface BackendProxyContract { - /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ - url: string; - /** Username to connect to the WebProxy server */ - username?: string; - /** Password to connect to the WebProxy Server */ - password?: string; + /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ + url: string; + /** Username to connect to the WebProxy server */ + username?: string; + /** Password to connect to the WebProxy Server */ + password?: string; } /** Properties controlling TLS Certificate Validation. */ export interface BackendTlsProperties { - /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ - validateCertificateChain?: boolean; - /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ - validateCertificateName?: boolean; + /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ + validateCertificateChain?: boolean; + /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ + validateCertificateName?: boolean; } /** Backend update parameters. */ export interface BackendUpdateParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** Paged Caches list representation. */ export interface CacheCollection { - /** Page values. */ - value?: CacheContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: CacheContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Cache update details. */ export interface CacheUpdateParameters { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; } /** Paged Certificates list representation. */ export interface CertificateCollection { - /** Page values. */ - value?: CertificateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: CertificateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Issue contract Update Properties. */ export interface KeyVaultLastAccessStatusContractProperties { - /** Last status code for sync and refresh of secret from key vault. */ - code?: string; - /** Details of the error else empty. */ - message?: string; - /** - * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timeStampUtc?: Date; + /** Last status code for sync and refresh of secret from key vault. */ + code?: string; + /** Details of the error else empty. */ + message?: string; + /** + * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + timeStampUtc?: Date; } /** Create keyVault contract details. */ export interface KeyVaultContractCreateProperties { - /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ - secretIdentifier?: string; - /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ - identityClientId?: string; + /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ + secretIdentifier?: string; + /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ + identityClientId?: string; } /** Certificate create or update details. */ export interface CertificateCreateOrUpdateParameters { - /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ - data?: string; - /** Password for the Certificate */ - password?: string; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractCreateProperties; + /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ + data?: string; + /** Password for the Certificate */ + password?: string; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractCreateProperties; } /** A request to perform the connectivity check operation on a API Management service. */ export interface ConnectivityCheckRequest { - /** Definitions about the connectivity check origin. */ - source: ConnectivityCheckRequestSource; - /** The connectivity check operation destination. */ - destination: ConnectivityCheckRequestDestination; - /** The IP version to be used. Only IPv4 is supported for now. */ - preferredIPVersion?: PreferredIPVersion; - /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ - protocol?: ConnectivityCheckProtocol; - /** Protocol-specific configuration. */ - protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; + /** Definitions about the connectivity check origin. */ + source: ConnectivityCheckRequestSource; + /** The connectivity check operation destination. */ + destination: ConnectivityCheckRequestDestination; + /** The IP version to be used. Only IPv4 is supported for now. */ + preferredIPVersion?: PreferredIPVersion; + /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ + protocol?: ConnectivityCheckProtocol; + /** Protocol-specific configuration. */ + protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; } /** Definitions about the connectivity check origin. */ export interface ConnectivityCheckRequestSource { - /** The API Management service region from where to start the connectivity check operation. */ - region: string; - /** The particular VMSS instance from which to fire the request. */ - instance?: number; + /** The API Management service region from where to start the connectivity check operation. */ + region: string; + /** The particular VMSS instance from which to fire the request. */ + instance?: number; } /** The connectivity check operation destination. */ export interface ConnectivityCheckRequestDestination { - /** Destination address. Can either be an IP address or a FQDN. */ - address: string; - /** Destination port. */ - port: number; + /** Destination address. Can either be an IP address or a FQDN. */ + address: string; + /** Destination port. */ + port: number; } /** Protocol-specific configuration. */ export interface ConnectivityCheckRequestProtocolConfiguration { - /** Configuration for HTTP or HTTPS requests. */ - httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; + /** Configuration for HTTP or HTTPS requests. */ + httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; } /** Configuration for HTTP or HTTPS requests. */ export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { - /** The HTTP method to be used. */ - method?: Method; - /** List of HTTP status codes considered valid for the request response. */ - validStatusCodes?: number[]; - /** List of headers to be included in the request. */ - headers?: HttpHeader[]; + /** The HTTP method to be used. */ + method?: Method; + /** List of HTTP status codes considered valid for the request response. */ + validStatusCodes?: number[]; + /** List of headers to be included in the request. */ + headers?: HttpHeader[]; } /** HTTP header and it's value. */ export interface HttpHeader { - /** Header name. */ - name: string; - /** Header value. */ - value: string; + /** Header name. */ + name: string; + /** Header value. */ + value: string; } /** Information on the connectivity status. */ export interface ConnectivityCheckResponse { - /** - * List of hops between the source and the destination. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hops?: ConnectivityHop[]; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: ConnectionStatus; - /** - * Average latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly avgLatencyInMs?: number; - /** - * Minimum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minLatencyInMs?: number; - /** - * Maximum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxLatencyInMs?: number; - /** - * Total number of probes sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesSent?: number; - /** - * Number of failed probes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesFailed?: number; + /** + * List of hops between the source and the destination. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hops?: ConnectivityHop[]; + /** + * The connection status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectionStatus?: ConnectionStatus; + /** + * Average latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly avgLatencyInMs?: number; + /** + * Minimum latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minLatencyInMs?: number; + /** + * Maximum latency in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxLatencyInMs?: number; + /** + * Total number of probes sent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly probesSent?: number; + /** + * Number of failed probes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly probesFailed?: number; } /** Information about a hop between the source and the destination. */ export interface ConnectivityHop { - /** - * The type of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The ID of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The IP address of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * The ID of the resource corresponding to this hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * List of next hop identifiers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHopIds?: string[]; - /** - * List of issues. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issues?: ConnectivityIssue[]; + /** + * The type of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The ID of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The IP address of the hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly address?: string; + /** + * The ID of the resource corresponding to this hop. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; + /** + * List of next hop identifiers. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextHopIds?: string[]; + /** + * List of issues. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issues?: ConnectivityIssue[]; } /** Information about an issue encountered in the process of checking for connectivity. */ export interface ConnectivityIssue { - /** - * The origin of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * The severity of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly severity?: Severity; - /** - * The type of issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: IssueType; - /** - * Provides additional context on the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly context?: { [propertyName: string]: string }[]; + /** + * The origin of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * The severity of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: Severity; + /** + * The type of issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: IssueType; + /** + * Provides additional context on the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly context?: { [propertyName: string]: string }[]; } /** Paged list of content types. */ export interface ContentTypeCollection { - /** - * Collection of content types. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentTypeContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of content types. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ContentTypeContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged list of content items. */ export interface ContentItemCollection { - /** - * Collection of content items. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentItemContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of content items. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ContentItemContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged deleted API Management Services List Representation. */ export interface DeletedServicesCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DeletedServiceContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DeletedServiceContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. */ export interface OperationListResult { - /** List of operations supported by the resource provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; + /** List of operations supported by the resource provider. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; } /** REST API operation */ export interface Operation { - /** Operation name: {provider}/{resource}/{operation} */ - name?: string; - /** The object that describes the operation. */ - display?: OperationDisplay; - /** The operation origin. */ - origin?: string; - /** The operation properties. */ - properties?: Record; + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that describes the operation. */ + display?: OperationDisplay; + /** The operation origin. */ + origin?: string; + /** The operation properties. */ + properties?: Record; } /** The object that describes the operation. */ export interface OperationDisplay { - /** Friendly name of the resource provider */ - provider?: string; - /** Operation type: read, write, delete, listKeys/action, etc. */ - operation?: string; - /** Resource type on which the operation is performed. */ - resource?: string; - /** Friendly name of the operation */ - description?: string; + /** Friendly name of the resource provider */ + provider?: string; + /** Operation type: read, write, delete, listKeys/action, etc. */ + operation?: string; + /** Resource type on which the operation is performed. */ + resource?: string; + /** Friendly name of the operation */ + description?: string; } /** The API Management service SKUs operation response. */ export interface ResourceSkuResults { - /** The list of skus available for the service. */ - value: ResourceSkuResult[]; - /** The uri to fetch the next page of API Management service Skus. */ - nextLink?: string; + /** The list of skus available for the service. */ + value: ResourceSkuResult[]; + /** The uri to fetch the next page of API Management service Skus. */ + nextLink?: string; } /** Describes an available API Management service SKU. */ export interface ResourceSkuResult { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * Specifies API Management SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: ResourceSku; - /** - * Specifies the number of API Management units. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ResourceSkuCapacity; + /** + * The type of resource the SKU applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * Specifies API Management SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sku?: ResourceSku; + /** + * Specifies the number of API Management units. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacity?: ResourceSkuCapacity; } /** Describes an available API Management SKU. */ export interface ResourceSku { - /** Name of the Sku. */ - name?: SkuType; + /** Name of the Sku. */ + name?: SkuType; } /** Describes scaling information of a SKU. */ export interface ResourceSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ResourceSkuCapacityScaleType; + /** + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minimum?: number; + /** + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximum?: number; + /** + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly default?: number; + /** + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scaleType?: ResourceSkuCapacityScaleType; } /** Parameters supplied to the Backup/Restore of an API Management service operation. */ export interface ApiManagementServiceBackupRestoreParameters { - /** The name of the Azure storage account (used to place/retrieve the backup). */ - storageAccount: string; - /** The name of the blob container (used to place/retrieve the backup). */ - containerName: string; - /** The name of the backup file to create/retrieve. */ - backupName: string; - /** The type of access to be used for the storage account. */ - accessType?: AccessType; - /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ - accessKey?: string; - /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ - clientId?: string; + /** The name of the Azure storage account (used to place/retrieve the backup). */ + storageAccount: string; + /** The name of the blob container (used to place/retrieve the backup). */ + containerName: string; + /** The name of the backup file to create/retrieve. */ + backupName: string; + /** The type of access to be used for the storage account. */ + accessType?: AccessType; + /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ + accessKey?: string; + /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ + clientId?: string; } /** Base Properties of an API Management service resource description. */ export interface ApiManagementServiceBaseProperties { - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; } /** Custom hostname configuration. */ export interface HostnameConfiguration { - /** Hostname type. */ - type: HostnameType; - /** Hostname to configure on the Api Management service. */ - hostName: string; - /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ - keyVaultId?: string; - /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ - identityClientId?: string; - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ - defaultSslBinding?: boolean; - /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ - negotiateClientCertificate?: boolean; - /** Certificate information. */ - certificate?: CertificateInformation; - /** Certificate Source. */ - certificateSource?: CertificateSource; - /** Certificate Status. */ - certificateStatus?: CertificateStatus; + /** Hostname type. */ + type: HostnameType; + /** Hostname to configure on the Api Management service. */ + hostName: string; + /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ + keyVaultId?: string; + /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ + identityClientId?: string; + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ + defaultSslBinding?: boolean; + /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ + negotiateClientCertificate?: boolean; + /** Certificate information. */ + certificate?: CertificateInformation; + /** Certificate Source. */ + certificateSource?: CertificateSource; + /** Certificate Status. */ + certificateStatus?: CertificateStatus; } /** SSL certificate information. */ export interface CertificateInformation { - /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expiry: Date; - /** Thumbprint of the certificate. */ - thumbprint: string; - /** Subject of the certificate. */ - subject: string; + /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry: Date; + /** Thumbprint of the certificate. */ + thumbprint: string; + /** Subject of the certificate. */ + subject: string; } /** Configuration of a virtual network to which API Management service is deployed. */ export interface VirtualNetworkConfiguration { - /** - * The virtual network ID. This is typically a GUID. Expect a null GUID by default. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vnetid?: string; - /** - * The name of the subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnetname?: string; - /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ - subnetResourceId?: string; + /** + * The virtual network ID. This is typically a GUID. Expect a null GUID by default. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vnetid?: string; + /** + * The name of the subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnetname?: string; + /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ + subnetResourceId?: string; } /** Description of an additional API Management resource location. */ export interface AdditionalLocation { - /** The location name of the additional region among Azure Data center regions. */ - location: string; - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Virtual network configuration for the location. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** - * Gateway URL of the API Management service in the Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ - disableGateway?: boolean; - /** - * Compute Platform Version running the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; + /** The location name of the additional region among Azure Data center regions. */ + location: string; + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Virtual network configuration for the location. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** + * Gateway URL of the API Management service in the Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ + disableGateway?: boolean; + /** + * Compute Platform Version running the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; } /** API Management service resource SKU properties. */ export interface ApiManagementServiceSkuProperties { - /** Name of the Sku. */ - name: SkuType; - /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ - capacity: number; + /** Name of the Sku. */ + name: SkuType; + /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ + capacity: number; } /** Certificate configuration which consist of non-trusted intermediates and root certificates. */ export interface CertificateConfiguration { - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ - storeName: CertificateConfigurationStoreName; - /** Certificate information. */ - certificate?: CertificateInformation; + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ + storeName: CertificateConfigurationStoreName; + /** Certificate information. */ + certificate?: CertificateInformation; } /** Control Plane Apis version constraint for the API Management service. */ export interface ApiVersionConstraint { - /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ - minApiVersion?: string; + /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ + minApiVersion?: string; } /** Remote Private Endpoint Connection resource. */ export interface RemotePrivateEndpointConnectionWrapper { - /** Private Endpoint connection resource id */ - id?: string; - /** Private Endpoint Connection Name */ - name?: string; - /** Private Endpoint Connection Resource Type */ - type?: string; - /** The resource of private end point. */ - privateEndpoint?: ArmIdWrapper; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * All the Group ids. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupIds?: string[]; + /** Private Endpoint connection resource id */ + id?: string; + /** Private Endpoint Connection Name */ + name?: string; + /** Private Endpoint Connection Resource Type */ + type?: string; + /** The resource of private end point. */ + privateEndpoint?: ArmIdWrapper; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * All the Group ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; } /** A wrapper for an ARM resource id */ export interface ArmIdWrapper { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly id?: string; } /** A collection of information about the state of the connection between service consumer and provider. */ export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: PrivateEndpointServiceConnectionStatus; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; } /** Identity properties of the Api Management service resource. */ export interface ApiManagementServiceIdentity { - /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type: ApimIdentityType; - /** - * The principal id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client tenant id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; + /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type: ApimIdentityType; + /** + * The principal id of the identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client tenant id of the identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; } export interface UserIdentityProperties { - /** The principal id of user assigned identity. */ - principalId?: string; - /** The client id of user assigned identity. */ - clientId?: string; + /** The principal id of user assigned identity. */ + principalId?: string; + /** The client id of user assigned identity. */ + clientId?: string; } /** 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; + /** 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; } /** The Resource definition. */ export interface ApimResource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type for API Management resource is set to Microsoft.ApiManagement. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type for API Management resource is set to Microsoft.ApiManagement. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; } /** The response of the List API Management services operation. */ export interface ApiManagementServiceListResult { - /** Result of the List API Management services operation. */ - value: ApiManagementServiceResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; + /** Result of the List API Management services operation. */ + value: ApiManagementServiceResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; } /** The response of the GetSsoToken operation. */ export interface ApiManagementServiceGetSsoTokenResult { - /** Redirect URL to the Publisher Portal containing the SSO token. */ - redirectUri?: string; + /** Redirect URL to the Publisher Portal containing the SSO token. */ + redirectUri?: string; } /** Parameters supplied to the CheckNameAvailability operation. */ export interface ApiManagementServiceCheckNameAvailabilityParameters { - /** The name to check for availability. */ - name: string; + /** The name to check for availability. */ + name: string; } /** Response of the CheckNameAvailability operation. */ export interface ApiManagementServiceNameAvailabilityResult { - /** - * True if the name is available and can be used to create a new API Management service; otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nameAvailable?: boolean; - /** - * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ - reason?: NameAvailabilityReason; + /** + * True if the name is available and can be used to create a new API Management service; otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nameAvailable?: boolean; + /** + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ + reason?: NameAvailabilityReason; } /** Response of the GetDomainOwnershipIdentifier operation. */ export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { - /** - * The domain ownership identifier value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly domainOwnershipIdentifier?: string; + /** + * The domain ownership identifier value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly domainOwnershipIdentifier?: string; } /** Parameter supplied to the Apply Network configuration operation. */ export interface ApiManagementServiceApplyNetworkConfigurationParameters { - /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ - location?: string; + /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ + location?: string; } /** Paged email template list representation. */ export interface EmailTemplateCollection { - /** Page values. */ - value?: EmailTemplateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: EmailTemplateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Email Template Parameter contract. */ export interface EmailTemplateParametersContractProperties { - /** Template parameter name. */ - name?: string; - /** Template parameter title. */ - title?: string; - /** Template parameter description. */ - description?: string; + /** Template parameter name. */ + name?: string; + /** Template parameter title. */ + title?: string; + /** Template parameter description. */ + description?: string; } /** Email Template update Parameters. */ export interface EmailTemplateUpdateParameters { - /** Subject of the Template. */ - subject?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; + /** Subject of the Template. */ + subject?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; } /** Paged Gateway list representation. */ export interface GatewayCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Resource location data properties. */ export interface ResourceLocationDataContract { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located. */ - countryOrRegion?: string; + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located. */ + countryOrRegion?: string; } /** Gateway authentication keys. */ export interface GatewayKeysContract { - /** Primary gateway key. */ - primary?: string; - /** Secondary gateway key. */ - secondary?: string; + /** Primary gateway key. */ + primary?: string; + /** Secondary gateway key. */ + secondary?: string; } /** Gateway key regeneration request contract properties. */ export interface GatewayKeyRegenerationRequestContract { - /** The Key being regenerated. */ - keyType: KeyType; + /** The Key being regenerated. */ + keyType: KeyType; } /** Gateway token request contract properties. */ export interface GatewayTokenRequestContract { - /** The Key to be used to generate gateway token. */ - keyType: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry: Date; + /** The Key to be used to generate gateway token. */ + keyType: KeyType; + /** + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expiry: Date; } /** Gateway access token. */ export interface GatewayTokenContract { - /** Shared Access Authentication token value for the Gateway. */ - value?: string; + /** Shared Access Authentication token value for the Gateway. */ + value?: string; } /** Paged Gateway hostname configuration list representation. */ export interface GatewayHostnameConfigurationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayHostnameConfigurationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayHostnameConfigurationContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Gateway certificate authority list representation. */ export interface GatewayCertificateAuthorityCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayCertificateAuthorityContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GatewayCertificateAuthorityContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged Group list representation. */ export interface GroupCollection { - /** Page values. */ - value?: GroupContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: GroupContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Group contract Properties. */ export interface GroupContractProperties { - /** Group name. */ - displayName: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - type?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** + * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly builtIn?: boolean; + /** Group type. */ + type?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Parameters supplied to the Create Group operation. */ export interface GroupCreateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Parameters supplied to the Update Group operation. */ export interface GroupUpdateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** Paged Users list representation. */ export interface UserCollection { - /** Page values. */ - value?: UserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: UserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** User Entity Base Parameters set. */ export interface UserEntityBaseParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; } /** User identity details. */ export interface UserIdentityContract { - /** Identity provider name. */ - provider?: string; - /** Identifier value within provider. */ - id?: string; + /** Identity provider name. */ + provider?: string; + /** Identifier value within provider. */ + id?: string; } /** List of all the Identity Providers configured on the service instance. */ export interface IdentityProviderList { - /** Identity Provider configuration values. */ - value?: IdentityProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Identity Provider configuration values. */ + value?: IdentityProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Identity Provider Base Parameter Properties. */ export interface IdentityProviderBaseParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; } /** Parameters supplied to update Identity Provider */ export interface IdentityProviderUpdateParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface ClientSecretContract { - /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ - clientSecret?: string; + /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ + clientSecret?: string; } /** Paged Logger list representation. */ export interface LoggerCollection { - /** Logger values. */ - value?: LoggerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Logger values. */ + value?: LoggerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Logger update contract. */ export interface LoggerUpdateContract { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** Logger credentials. */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** Logger credentials. */ + credentials?: { [propertyName: string]: string }; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; } /** Paged NamedValue list representation. */ export interface NamedValueCollection { - /** Page values. */ - value?: NamedValueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: NamedValueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** NamedValue Entity Base Parameters set. */ export interface NamedValueEntityBaseParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; } /** NamedValue update Parameters. */ export interface NamedValueUpdateParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface NamedValueSecretContract { - /** This is secret value of the NamedValue entity. */ - value?: string; + /** This is secret value of the NamedValue entity. */ + value?: string; } /** Network Status in the Location */ export interface NetworkStatusContractByLocation { - /** Location of service */ - location?: string; - /** Network status in Location */ - networkStatus?: NetworkStatusContract; + /** Location of service */ + location?: string; + /** Network status in Location */ + networkStatus?: NetworkStatusContract; } /** Network Status details. */ export interface NetworkStatusContract { - /** Gets the list of DNS servers IPV4 addresses. */ - dnsServers: string[]; - /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ - connectivityStatus: ConnectivityStatusContract[]; + /** Gets the list of DNS servers IPV4 addresses. */ + dnsServers: string[]; + /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ + connectivityStatus: ConnectivityStatusContract[]; } /** Details about connectivity to a resource. */ export interface ConnectivityStatusContract { - /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ - name: string; - /** Resource Connectivity Status Type identifier. */ - status: ConnectivityStatusType; - /** Error details of the connectivity to the resource. */ - error?: string; - /** - * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastUpdated: Date; - /** - * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastStatusChange: Date; - /** Resource Type. */ - resourceType: string; - /** Whether this is optional. */ - isOptional: boolean; + /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ + name: string; + /** Resource Connectivity Status Type identifier. */ + status: ConnectivityStatusType; + /** Error details of the connectivity to the resource. */ + error?: string; + /** + * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + lastUpdated: Date; + /** + * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + lastStatusChange: Date; + /** Resource Type. */ + resourceType: string; + /** Whether this is optional. */ + isOptional: boolean; } /** Paged Notification list representation. */ export interface NotificationCollection { - /** Page values. */ - value?: NotificationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: NotificationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Notification Parameter contract. */ export interface RecipientsContractProperties { - /** List of Emails subscribed for the notification. */ - emails?: string[]; - /** List of Users subscribed for the notification. */ - users?: string[]; + /** List of Emails subscribed for the notification. */ + emails?: string[]; + /** List of Users subscribed for the notification. */ + users?: string[]; } /** Paged Recipient User list representation. */ export interface RecipientUserCollection { - /** Page values. */ - value?: RecipientUserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: RecipientUserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Recipient User list representation. */ export interface RecipientEmailCollection { - /** Page values. */ - value?: RecipientEmailContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: RecipientEmailContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged OpenIdProviders list representation. */ export interface OpenIdConnectProviderCollection { - /** Page values. */ - value?: OpenidConnectProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: OpenidConnectProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Parameters supplied to the Update OpenID Connect Provider operation. */ export interface OpenidConnectProviderUpdateContract { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; } /** Collection of Outbound Environment Endpoints */ export interface OutboundEnvironmentEndpointList { - /** Collection of resources. */ - value: OutboundEnvironmentEndpoint[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** Collection of resources. */ + value: OutboundEnvironmentEndpoint[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. */ export interface OutboundEnvironmentEndpoint { - /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ - category?: string; - /** The endpoints that the Api Management Service reaches the service at. */ - endpoints?: EndpointDependency[]; + /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ + category?: string; + /** The endpoints that the Api Management Service reaches the service at. */ + endpoints?: EndpointDependency[]; } /** A domain name that a service is reached at. */ export interface EndpointDependency { - /** The domain name of the dependency. */ - domainName?: string; - /** The Ports used when connecting to DomainName. */ - endpointDetails?: EndpointDetail[]; + /** The domain name of the dependency. */ + domainName?: string; + /** The Ports used when connecting to DomainName. */ + endpointDetails?: EndpointDetail[]; } /** Current TCP connectivity information from the Api Management Service to a single endpoint. */ export interface EndpointDetail { - /** The port an endpoint is connected to. */ - port?: number; - /** The region of the dependency. */ - region?: string; + /** The port an endpoint is connected to. */ + port?: number; + /** The region of the dependency. */ + region?: string; } /** Descriptions of API Management policies. */ export interface PolicyDescriptionCollection { - /** Descriptions of API Management policies. */ - value?: PolicyDescriptionContract[]; - /** Total record count number. */ - count?: number; + /** Descriptions of API Management policies. */ + value?: PolicyDescriptionContract[]; + /** Total record count number. */ + count?: number; } /** The response of the get policy fragments operation. */ export interface PolicyFragmentCollection { - /** Policy fragment contract value. */ - value?: PolicyFragmentContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Policy fragment contract value. */ + value?: PolicyFragmentContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** A collection of resources. */ export interface ResourceCollection { - /** A collection of resources. */ - value?: ResourceCollectionValueItem[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** A collection of resources. */ + value?: ResourceCollectionValueItem[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** The collection of the developer portal configurations. */ export interface PortalConfigCollection { - /** The developer portal configurations. */ - value?: PortalConfigContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** The developer portal configurations. */ + value?: PortalConfigContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } export interface PortalConfigPropertiesSignin { - /** Redirect anonymous users to the sign-in page. */ - require?: boolean; + /** Redirect anonymous users to the sign-in page. */ + require?: boolean; } export interface PortalConfigPropertiesSignup { - /** Terms of service settings. */ - termsOfService?: PortalConfigTermsOfServiceProperties; + /** Terms of service settings. */ + termsOfService?: PortalConfigTermsOfServiceProperties; } /** Terms of service contract properties. */ export interface PortalConfigTermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Ask user for consent to the terms of service. */ - requireConsent?: boolean; + /** A terms of service text. */ + text?: string; + /** Ask user for consent to the terms of service. */ + requireConsent?: boolean; } export interface PortalConfigDelegationProperties { - /** Enable or disable delegation for user registration. */ - delegateRegistration?: boolean; - /** Enable or disable delegation for product subscriptions. */ - delegateSubscription?: boolean; - /** A delegation endpoint URL. */ - delegationUrl?: string; - /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ - validationKey?: string; + /** Enable or disable delegation for user registration. */ + delegateRegistration?: boolean; + /** Enable or disable delegation for product subscriptions. */ + delegateSubscription?: boolean; + /** A delegation endpoint URL. */ + delegationUrl?: string; + /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ + validationKey?: string; } /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ export interface PortalConfigCorsProperties { - /** Allowed origins, e.g. `https://trusted.com`. */ - allowedOrigins?: string[]; + /** Allowed origins, e.g. `https://trusted.com`. */ + allowedOrigins?: string[]; } /** The developer portal Content Security Policy (CSP) settings. */ export interface PortalConfigCspProperties { - /** The mode of the developer portal Content Security Policy (CSP). */ - mode?: PortalSettingsCspMode; - /** The URLs used by the browser to report CSP violations. */ - reportUri?: string[]; - /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ - allowedSources?: string[]; + /** The mode of the developer portal Content Security Policy (CSP). */ + mode?: PortalSettingsCspMode; + /** The URLs used by the browser to report CSP violations. */ + reportUri?: string[]; + /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ + allowedSources?: string[]; } /** Paged list of portal revisions. */ export interface PortalRevisionCollection { - /** - * Collection of portal revisions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: PortalRevisionContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Collection of portal revisions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: PortalRevisionContract[]; + /** + * Next page link, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Descriptions of API Management policies. */ export interface PortalSettingsCollection { - /** Descriptions of API Management policies. */ - value?: PortalSettingsContract[]; - /** Total record count number. */ - count?: number; + /** Descriptions of API Management policies. */ + value?: PortalSettingsContract[]; + /** Total record count number. */ + count?: number; } /** Subscriptions delegation settings properties. */ export interface SubscriptionsDelegationSettingsProperties { - /** Enable or disable delegation for subscriptions. */ - enabled?: boolean; + /** Enable or disable delegation for subscriptions. */ + enabled?: boolean; } /** User registration delegation settings properties. */ export interface RegistrationDelegationSettingsProperties { - /** Enable or disable delegation for user registration. */ - enabled?: boolean; + /** Enable or disable delegation for user registration. */ + enabled?: boolean; } /** Terms of service contract properties. */ export interface TermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Display terms of service during a sign-up process. */ - enabled?: boolean; - /** Ask user for consent to the terms of service. */ - consentRequired?: boolean; + /** A terms of service text. */ + text?: string; + /** Display terms of service during a sign-up process. */ + enabled?: boolean; + /** Ask user for consent to the terms of service. */ + consentRequired?: boolean; } /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ export interface PortalSettingValidationKeyContract { - /** This is secret value of the validation key in portal settings. */ - validationKey?: string; + /** This is secret value of the validation key in portal settings. */ + validationKey?: string; } /** List of private endpoint connection associated with the specified storage account */ export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; } /** The Private Endpoint resource. */ export interface PrivateEndpoint { - /** - * The ARM identifier for Private Endpoint - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; } /** A request to approve or reject a private endpoint connection */ export interface PrivateEndpointConnectionRequest { - /** Private Endpoint Connection Resource Id. */ - id?: string; - /** The connection state of the private endpoint connection. */ - properties?: PrivateEndpointConnectionRequestProperties; + /** Private Endpoint Connection Resource Id. */ + id?: string; + /** The connection state of the private endpoint connection. */ + properties?: PrivateEndpointConnectionRequestProperties; } /** The connection state of the private endpoint connection. */ export interface PrivateEndpointConnectionRequestProperties { - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } /** A list of private link resources */ export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; + /** Array of private link resources */ + value?: PrivateLinkResource[]; } /** Product Update parameters. */ export interface ProductUpdateParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; } /** Paged Subscriptions list representation. */ export interface SubscriptionCollection { - /** Page values. */ - value?: SubscriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: SubscriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Paged Quota Counter list representation. */ export interface QuotaCounterCollection { - /** Quota counter values. */ - value?: QuotaCounterContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Quota counter values. */ + value?: QuotaCounterContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Quota counter details. */ export interface QuotaCounterContract { - /** The Key value of the Counter. Must not be empty. */ - counterKey: string; - /** Identifier of the Period for which the counter was collected. Must not be empty. */ - periodKey: string; - /** - * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodStartTime: Date; - /** - * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodEndTime: Date; - /** Quota Value Properties */ - value?: QuotaCounterValueContractProperties; + /** The Key value of the Counter. Must not be empty. */ + counterKey: string; + /** Identifier of the Period for which the counter was collected. Must not be empty. */ + periodKey: string; + /** + * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + periodStartTime: Date; + /** + * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + periodEndTime: Date; + /** Quota Value Properties */ + value?: QuotaCounterValueContractProperties; } /** Quota counter value details. */ export interface QuotaCounterValueContractProperties { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Quota counter value details. */ export interface QuotaCounterValueUpdateContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Lists Regions operation response details. */ export interface RegionListResult { - /** Lists of Regions. */ - value?: RegionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Lists of Regions. */ + value?: RegionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Region profile. */ export interface RegionContract { - /** - * Region name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** whether Region is the master region. */ - isMasterRegion?: boolean; - /** whether Region is deleted. */ - isDeleted?: boolean; + /** + * Region name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** whether Region is the master region. */ + isMasterRegion?: boolean; + /** whether Region is deleted. */ + isDeleted?: boolean; } /** Paged Report records list representation. */ export interface ReportCollection { - /** Page values. */ - value?: ReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** Page values. */ + value?: ReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Report data. */ export interface ReportRecordContract { - /** Name depending on report endpoint specifies product, API, operation or developer name. */ - name?: string; - /** - * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timestamp?: Date; - /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ - interval?: string; - /** Country to which this record data is related. */ - country?: string; - /** Country region to which this record data is related. */ - region?: string; - /** Zip code to which this record data is related. */ - zip?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** API region identifier. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ - callCountSuccess?: number; - /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ - callCountBlocked?: number; - /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ - callCountFailed?: number; - /** Number of other calls. */ - callCountOther?: number; - /** Total number of calls. */ - callCountTotal?: number; - /** Bandwidth consumed. */ - bandwidth?: number; - /** Number of times when content was served from cache policy. */ - cacheHitCount?: number; - /** Number of times content was fetched from backend. */ - cacheMissCount?: number; - /** Average time it took to process request. */ - apiTimeAvg?: number; - /** Minimum time it took to process request. */ - apiTimeMin?: number; - /** Maximum time it took to process request. */ - apiTimeMax?: number; - /** Average time it took to process request on backend. */ - serviceTimeAvg?: number; - /** Minimum time it took to process request on backend. */ - serviceTimeMin?: number; - /** Maximum time it took to process request on backend. */ - serviceTimeMax?: number; + /** Name depending on report endpoint specifies product, API, operation or developer name. */ + name?: string; + /** + * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + timestamp?: Date; + /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ + interval?: string; + /** Country to which this record data is related. */ + country?: string; + /** Country region to which this record data is related. */ + region?: string; + /** Zip code to which this record data is related. */ + zip?: string; + /** + * User identifier path. /users/{userId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userId?: string; + /** + * Product identifier path. /products/{productId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly productId?: string; + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** API region identifier. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ + callCountSuccess?: number; + /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ + callCountBlocked?: number; + /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ + callCountFailed?: number; + /** Number of other calls. */ + callCountOther?: number; + /** Total number of calls. */ + callCountTotal?: number; + /** Bandwidth consumed. */ + bandwidth?: number; + /** Number of times when content was served from cache policy. */ + cacheHitCount?: number; + /** Number of times content was fetched from backend. */ + cacheMissCount?: number; + /** Average time it took to process request. */ + apiTimeAvg?: number; + /** Minimum time it took to process request. */ + apiTimeMin?: number; + /** Maximum time it took to process request. */ + apiTimeMax?: number; + /** Average time it took to process request on backend. */ + serviceTimeAvg?: number; + /** Minimum time it took to process request on backend. */ + serviceTimeMin?: number; + /** Maximum time it took to process request on backend. */ + serviceTimeMax?: number; } /** Paged Report records list representation. */ export interface RequestReportCollection { - /** Page values. */ - value?: RequestReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; + /** Page values. */ + value?: RequestReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; } /** Request Report data. */ export interface RequestReportRecordContract { - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** The HTTP method associated with this request.. */ - method?: string; - /** The full URL associated with this request. */ - url?: string; - /** The client IP address associated with this request. */ - ipAddress?: string; - /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ - backendResponseCode?: string; - /** The HTTP status code returned by the gateway. */ - responseCode?: number; - /** The size of the response returned by the gateway. */ - responseSize?: number; - /** The date and time when this request was received by the gateway in ISO 8601 format. */ - timestamp?: Date; - /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ - cache?: string; - /** The total time it took to process this request. */ - apiTime?: number; - /** he time it took to forward this request to the backend and get the response back. */ - serviceTime?: number; - /** Azure region where the gateway that processed this request is located. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Request Identifier. */ - requestId?: string; - /** The size of this request.. */ - requestSize?: number; + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** + * Product identifier path. /products/{productId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly productId?: string; + /** + * User identifier path. /users/{userId} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userId?: string; + /** The HTTP method associated with this request.. */ + method?: string; + /** The full URL associated with this request. */ + url?: string; + /** The client IP address associated with this request. */ + ipAddress?: string; + /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ + backendResponseCode?: string; + /** The HTTP status code returned by the gateway. */ + responseCode?: number; + /** The size of the response returned by the gateway. */ + responseSize?: number; + /** The date and time when this request was received by the gateway in ISO 8601 format. */ + timestamp?: Date; + /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ + cache?: string; + /** The total time it took to process this request. */ + apiTime?: number; + /** he time it took to forward this request to the backend and get the response back. */ + serviceTime?: number; + /** Azure region where the gateway that processed this request is located. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Request Identifier. */ + requestId?: string; + /** The size of this request.. */ + requestSize?: number; } /** The response of the list schema operation. */ export interface GlobalSchemaCollection { - /** - * Global Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GlobalSchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Global Schema Contract value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GlobalSchemaContract[]; + /** Total record count number. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Paged AccessInformation list representation. */ export interface TenantSettingsCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: TenantSettingsContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TenantSettingsContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** The List Resource Skus operation response. */ export interface ApiManagementSkusResult { - /** The list of skus available for the subscription. */ - value: ApiManagementSku[]; - /** - * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** The list of skus available for the subscription. */ + value: ApiManagementSku[]; + /** + * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Describes an available ApiManagement SKU. */ export interface ApiManagementSku { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The name of SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; - /** - * The Size of the SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** - * The Family of this particular SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly family?: string; - /** - * The Kind of resources that are supported in this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * Specifies the number of virtual machines in the scale set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ApiManagementSkuCapacity; - /** - * The set of locations that the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * A list of locations and availability zones in those locations where the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationInfo?: ApiManagementSkuLocationInfo[]; - /** - * The api versions that support this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersions?: string[]; - /** - * Metadata for retrieving price info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costs?: ApiManagementSkuCosts[]; - /** - * A name value pair to describe the capability. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; - /** - * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictions?: ApiManagementSkuRestrictions[]; + /** + * The type of resource the SKU applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * The name of SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tier?: string; + /** + * The Size of the SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly size?: string; + /** + * The Family of this particular SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly family?: string; + /** + * The Kind of resources that are supported in this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: string; + /** + * Specifies the number of virtual machines in the scale set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacity?: ApiManagementSkuCapacity; + /** + * The set of locations that the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: string[]; + /** + * A list of locations and availability zones in those locations where the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locationInfo?: ApiManagementSkuLocationInfo[]; + /** + * The api versions that support this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiVersions?: string[]; + /** + * Metadata for retrieving price info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly costs?: ApiManagementSkuCosts[]; + /** + * A name value pair to describe the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ApiManagementSkuCapabilities[]; + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictions?: ApiManagementSkuRestrictions[]; } /** Describes scaling information of a SKU. */ export interface ApiManagementSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ApiManagementSkuCapacityScaleType; + /** + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minimum?: number; + /** + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximum?: number; + /** + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly default?: number; + /** + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scaleType?: ApiManagementSkuCapacityScaleType; } export interface ApiManagementSkuLocationInfo { - /** - * Location of the SKU - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** - * List of availability zones where the SKU is supported. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; - /** - * Details of capabilities available to a SKU in specific zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zoneDetails?: ApiManagementSkuZoneDetails[]; + /** + * Location of the SKU + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * List of availability zones where the SKU is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; + /** + * Details of capabilities available to a SKU in specific zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zoneDetails?: ApiManagementSkuZoneDetails[]; } /** Describes The zonal capabilities of a SKU. */ export interface ApiManagementSkuZoneDetails { - /** - * The set of zones that the SKU is available in with the specified capabilities. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string[]; - /** - * A list of capabilities that are available for the SKU in the specified list of zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; + /** + * The set of zones that the SKU is available in with the specified capabilities. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string[]; + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: ApiManagementSkuCapabilities[]; } /** Describes The SKU capabilities object. */ export interface ApiManagementSkuCapabilities { - /** - * An invariant to describe the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * An invariant if the feature is measured by quantity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; + /** + * An invariant to describe the feature. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * An invariant if the feature is measured by quantity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; } /** Describes metadata for retrieving price info. */ export interface ApiManagementSkuCosts { - /** - * Used for querying price from commerce. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly meterID?: string; - /** - * The multiplier is needed to extend the base metered cost. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quantity?: number; - /** - * An invariant to show the extended unit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extendedUnit?: string; + /** + * Used for querying price from commerce. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly meterID?: string; + /** + * The multiplier is needed to extend the base metered cost. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly quantity?: number; + /** + * An invariant to show the extended unit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly extendedUnit?: string; } /** Describes scaling information of a SKU. */ export interface ApiManagementSkuRestrictions { - /** - * The type of restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: ApiManagementSkuRestrictionsType; - /** - * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly values?: string[]; - /** - * The information about the restriction where the SKU cannot be used. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; - /** - * The reason for restriction. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; + /** + * The type of restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: ApiManagementSkuRestrictionsType; + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly values?: string[]; + /** + * The information about the restriction where the SKU cannot be used. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; + /** + * The reason for restriction. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; } export interface ApiManagementSkuRestrictionInfo { - /** - * Locations where the SKU is restricted - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * List of availability zones where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; + /** + * Locations where the SKU is restricted + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: string[]; + /** + * List of availability zones where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zones?: string[]; } /** Subscription create details. */ export interface SubscriptionCreateParameters { - /** User (user id path) for whom subscription is being created in form /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. If not specified during request key will be generated automatically. */ - primaryKey?: string; - /** Secondary subscription key. If not specified during request key will be generated automatically. */ - secondaryKey?: string; - /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; + /** User (user id path) for whom subscription is being created in form /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. If not specified during request key will be generated automatically. */ + primaryKey?: string; + /** Secondary subscription key. If not specified during request key will be generated automatically. */ + secondaryKey?: string; + /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; } /** Subscription update details. */ export interface SubscriptionUpdateParameters { - /** User identifier path: /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId} */ - scope?: string; - /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expirationDate?: Date; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. */ - primaryKey?: string; - /** Secondary subscription key. */ - secondaryKey?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; + /** User identifier path: /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId} */ + scope?: string; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. */ + primaryKey?: string; + /** Secondary subscription key. */ + secondaryKey?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; } /** Subscription keys. */ export interface SubscriptionKeysContract { - /** Subscription primary key. */ - primaryKey?: string; - /** Subscription secondary key. */ - secondaryKey?: string; + /** Subscription primary key. */ + primaryKey?: string; + /** Subscription secondary key. */ + secondaryKey?: string; } /** Parameters supplied to Create/Update Tag operations. */ export interface TagCreateUpdateParameters { - /** Tag name. */ - displayName?: string; + /** Tag name. */ + displayName?: string; } /** Paged AccessInformation list representation. */ export interface AccessInformationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: AccessInformationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: AccessInformationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Tenant access information update parameters. */ export interface AccessInformationCreateParameters { - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Tenant access information update parameters. */ export interface AccessInformationUpdateParameters { - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Tenant access information contract of the API Management service. */ export interface AccessInformationSecretsContract { - /** Access Information type ('access' or 'gitAccess') */ - id?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Access Information type ('access' or 'gitAccess') */ + id?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Deploy Tenant Configuration Contract. */ export interface DeployConfigurationParameters { - /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ - branch?: string; - /** The value enforcing deleting subscriptions to products that are deleted in this update. */ - force?: boolean; + /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ + branch?: string; + /** The value enforcing deleting subscriptions to products that are deleted in this update. */ + force?: boolean; } /** Log of the entity being created, updated or deleted. */ export interface OperationResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; + /** The type of entity contract. */ + objectType?: string; + /** Action like create/update/delete. */ + action?: string; + /** Identifier of the entity being created/updated/deleted. */ + objectKey?: string; } /** Save Tenant Configuration Contract details. */ export interface SaveConfigurationParameter { - /** The name of the Git branch in which to commit the current configuration snapshot. */ - branch?: string; - /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ - force?: boolean; + /** The name of the Git branch in which to commit the current configuration snapshot. */ + branch?: string; + /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ + force?: boolean; } /** User create details. */ export interface UserCreateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; } /** User update parameters. */ export interface UserUpdateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; } /** Generate SSO Url operations response details. */ export interface GenerateSsoUrlResult { - /** Redirect Url containing the SSO URL value. */ - value?: string; + /** Redirect Url containing the SSO URL value. */ + value?: string; } /** List of Users Identity list representation. */ export interface UserIdentityCollection { - /** User Identity values. */ - value?: UserIdentityContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; + /** User Identity values. */ + value?: UserIdentityContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; } /** Get User Token parameters. */ export interface UserTokenParameters { - /** The Key to be used to generate token for user. */ - keyType?: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry?: Date; + /** The Key to be used to generate token for user. */ + keyType?: KeyType; + /** + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expiry?: Date; } /** Get User Token response details. */ export interface UserTokenResult { - /** Shared Access Authorization token for the User. */ - value?: string; + /** Shared Access Authorization token for the User. */ + value?: string; } /** Paged Documentation list representation. */ export interface DocumentationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DocumentationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; + /** + * Page values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DocumentationContract[]; + /** + * Next page link if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } /** Documentation update contract details. */ export interface DocumentationUpdateContract { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; } /** Object used to create an API Revision or Version based on an existing API Revision */ export interface ApiRevisionInfoContract { - /** Resource identifier of API to be used to create the revision from. */ - sourceApiId?: string; - /** Version identifier for the new API Version. */ - apiVersionName?: string; - /** Description of new API Revision. */ - apiRevisionDescription?: string; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** Resource identifier of API to be used to create the revision from. */ + sourceApiId?: string; + /** Version identifier for the new API Version. */ + apiVersionName?: string; + /** Description of new API Revision. */ + apiRevisionDescription?: string; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** Quota counter value details. */ export interface QuotaCounterValueContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; } /** Log of the entity being created, updated or deleted. */ export interface ResolverResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; + /** The type of entity contract. */ + objectType?: string; + /** Action like create/update/delete. */ + action?: string; + /** Identifier of the entity being created/updated/deleted. */ + objectKey?: string; } /** API Entity Properties */ export interface ApiContractProperties extends ApiEntityBaseContract { - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** API update contract properties. */ export interface ApiContractUpdateProperties extends ApiEntityBaseContract { - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** API contract properties for the Tag Resources. */ export interface ApiTagResourceContractProperties - extends ApiEntityBaseContract { - /** API identifier in the form /apis/{apiId}. */ - id?: string; - /** API name. */ - name?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; + extends ApiEntityBaseContract { + /** API identifier in the form /apis/{apiId}. */ + id?: string; + /** API name. */ + name?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} +export interface ProxyResource extends Resource { } /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends Resource { - /** The resource of private end point. */ - privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } /** A private link resource */ export interface PrivateLinkResource extends Resource { - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** The private link resource Private link DNS zone name. */ - requiredZoneNames?: string[]; + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** The private link resource Private link DNS zone name. */ + requiredZoneNames?: string[]; } /** Operation Contract Properties */ export interface OperationContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate: string; + extends OperationEntityBaseContract { + /** Operation Name. */ + displayName: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate: string; } /** Operation Update Contract Properties. */ export interface OperationUpdateContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + extends OperationEntityBaseContract { + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** Product profile. */ export interface ProductContractProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName: string; + /** Product name. */ + displayName: string; } /** Product profile. */ export interface ProductTagResourceContractProperties - extends ProductEntityBaseParameters { - /** Identifier of the product in the form of /products/{productId} */ - id?: string; - /** Product name. */ - name: string; + extends ProductEntityBaseParameters { + /** Identifier of the product in the form of /products/{productId} */ + id?: string; + /** Product name. */ + name: string; } /** Parameters supplied to the Update Product operation. */ export interface ProductUpdateProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName?: string; + /** Product name. */ + displayName?: string; } /** Issue contract Properties. */ export interface IssueContractProperties extends IssueContractBaseProperties { - /** The issue title. */ - title: string; - /** Text describing the issue. */ - description: string; - /** A resource identifier for the user created the issue. */ - userId: string; + /** The issue title. */ + title: string; + /** Text describing the issue. */ + description: string; + /** A resource identifier for the user created the issue. */ + userId: string; } /** Issue contract Update Properties. */ export interface IssueUpdateContractProperties - extends IssueContractBaseProperties { - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + extends IssueContractBaseProperties { + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** TagDescription contract Properties. */ export interface TagDescriptionContractProperties - extends TagDescriptionBaseProperties { - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; + extends TagDescriptionBaseProperties { + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; } /** Properties of an API Version Set. */ export interface ApiVersionSetContractProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme: VersioningScheme; + extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme: VersioningScheme; } /** Properties used to create or update an API Version Set. */ export interface ApiVersionSetUpdateParametersProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** External OAuth authorization server settings Properties. */ export interface AuthorizationServerContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** External OAuth authorization server Update settings contract. */ export interface AuthorizationServerUpdateContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Parameters supplied to the Create Backend operation. */ export interface BackendContractProperties extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url: string; - /** Backend communication protocol. */ - protocol: BackendProtocol; + /** Runtime Url of the Backend. */ + url: string; + /** Backend communication protocol. */ + protocol: BackendProtocol; } /** Parameters supplied to the Update Backend operation. */ export interface BackendUpdateParameterProperties - extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + extends BackendBaseParameters { + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** KeyVault contract details. */ export interface KeyVaultContractProperties - extends KeyVaultContractCreateProperties { - /** Last time sync and refresh status of secret from key vault. */ - lastStatus?: KeyVaultLastAccessStatusContractProperties; + extends KeyVaultContractCreateProperties { + /** Last time sync and refresh status of secret from key vault. */ + lastStatus?: KeyVaultLastAccessStatusContractProperties; } /** Properties of an API Management service resource description. */ export interface ApiManagementServiceProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; + extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; } /** Properties of an API Management service resource description. */ export interface ApiManagementServiceUpdateProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; + extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; } /** A single API Management service resource in List or Get response. */ export interface ApiManagementServiceResource extends ApimResource { - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Resource location. */ - location: string; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Resource location. */ + location: string; + /** + * ETag of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; } /** Parameter supplied to Update Api Management Service. */ export interface ApiManagementServiceUpdateParameters extends ApimResource { - /** SKU properties of the API Management service. */ - sku?: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; + /** SKU properties of the API Management service. */ + sku?: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** + * ETag of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetProvisioningState?: string; + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAtUtc?: Date; + /** + * Gateway URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayUrl?: string; + /** + * Gateway URL of the API Management service in the Default Region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayRegionalUrl?: string; + /** + * Publisher portal endpoint Url of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly portalUrl?: string; + /** + * Management API endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managementApiUrl?: string; + /** + * SCM endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scmUrl?: string; + /** + * DEveloper Portal endpoint URL of the API Management service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicIPAddresses?: string[]; + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: { [propertyName: string]: string }; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** + * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** + * Compute Platform Version running the service in this location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly platformVersion?: PlatformVersion; + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; } /** User profile. */ export interface UserContractProperties extends UserEntityBaseParameters { - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** + * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + registrationDate?: Date; + /** + * Collection of groups user is part of. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groups?: GroupContractProperties[]; } /** Parameters supplied to the Create User operation. */ export interface UserCreateParameterProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email: string; - /** First name. */ - firstName: string; - /** Last name. */ - lastName: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; + extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email: string; + /** First name. */ + firstName: string; + /** Last name. */ + lastName: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; } /** Parameters supplied to the Update User operation. */ export interface UserUpdateParametersProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; + extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; } /** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ export interface IdentityProviderContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ export interface IdentityProviderCreateContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret: string; } /** Parameters supplied to the Update Identity Provider operation. */ export interface IdentityProviderUpdateProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; + extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; } /** NamedValue Contract properties. */ export interface NamedValueContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; } /** NamedValue Contract properties. */ export interface NamedValueCreateContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** NamedValue Contract properties. */ export interface NamedValueUpdateParameterProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** API Create or Update Properties. */ export interface ApiCreateOrUpdateProperties extends ApiContractProperties { - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; } /** API details. */ export interface ApiContract extends ProxyResource { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** + * Indicates if API revision is accessible via the gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; } /** ApiRelease details. */ export interface ApiReleaseContract extends ProxyResource { - /** Identifier of the API the release belongs to. */ - apiId?: string; - /** - * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API release was updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** Release Notes */ - notes?: string; + /** Identifier of the API the release belongs to. */ + apiId?: string; + /** + * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * The time the API release was updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; + /** Release Notes */ + notes?: string; } /** API Operation details. */ export interface OperationContract extends ProxyResource { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; } /** Policy Contract details. */ export interface PolicyContract extends ProxyResource { - /** Contents of the Policy as defined by the format. */ - value?: string; - /** Format of the policyContent. */ - format?: PolicyContentFormat; + /** Contents of the Policy as defined by the format. */ + value?: string; + /** Format of the policyContent. */ + format?: PolicyContentFormat; } /** Tag Contract details. */ export interface TagContract extends ProxyResource { - /** Tag name. */ - displayName?: string; + /** Tag name. */ + displayName?: string; } /** GraphQL API Resolver details. */ export interface ResolverContract extends ProxyResource { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; } /** Product details. */ export interface ProductContract extends ProxyResource { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; } /** API Schema Contract details. */ export interface SchemaContract extends ProxyResource { - /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. */ - contentType?: string; - /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ - value?: string; - /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ - definitions?: Record; - /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ - components?: Record; + /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. */ + contentType?: string; + /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ + value?: string; + /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ + definitions?: Record; + /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ + components?: Record; } /** Diagnostic details. */ export interface DiagnosticContract extends ProxyResource { - /** Specifies for what type of messages sampling settings should not apply. */ - alwaysLog?: AlwaysLog; - /** Resource Id of a target logger. */ - loggerId?: string; - /** Sampling settings for Diagnostic. */ - sampling?: SamplingSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ - frontend?: PipelineDiagnosticSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ - backend?: PipelineDiagnosticSettings; - /** Log the ClientIP. Default is false. */ - logClientIp?: boolean; - /** Sets correlation protocol to use for Application Insights diagnostics. */ - httpCorrelationProtocol?: HttpCorrelationProtocol; - /** The verbosity level applied to traces emitted by trace policies. */ - verbosity?: Verbosity; - /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ - operationNameFormat?: OperationNameFormat; - /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ - metrics?: boolean; + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId?: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; } /** Issue Contract details. */ export interface IssueContract extends ProxyResource { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; } /** Issue Comment Contract details. */ export interface IssueCommentContract extends ProxyResource { - /** Comment text. */ - text?: string; - /** Date and time when the comment was created. */ - createdDate?: Date; - /** A resource identifier for the user who left the comment. */ - userId?: string; + /** Comment text. */ + text?: string; + /** Date and time when the comment was created. */ + createdDate?: Date; + /** A resource identifier for the user who left the comment. */ + userId?: string; } /** Issue Attachment Contract details. */ export interface IssueAttachmentContract extends ProxyResource { - /** Filename by which the binary data will be saved. */ - title?: string; - /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ - contentFormat?: string; - /** An HTTP link or Base64-encoded binary data. */ - content?: string; + /** Filename by which the binary data will be saved. */ + title?: string; + /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ + contentFormat?: string; + /** An HTTP link or Base64-encoded binary data. */ + content?: string; } /** Contract details. */ export interface TagDescriptionContract extends ProxyResource { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; } /** Wiki properties */ export interface WikiContract extends ProxyResource { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; } /** API Version Set Contract details. */ export interface ApiVersionSetContract extends ProxyResource { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; } /** External OAuth authorization server settings. */ export interface AuthorizationServerContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** External OAuth authorization server settings. */ export interface AuthorizationServerUpdateContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Authorization Provider contract. */ export interface AuthorizationProviderContract extends ProxyResource { - /** Authorization Provider name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Identity provider name. Must be 1 to 300 characters long. */ - identityProvider?: string; - /** OAuth2 settings */ - oauth2?: AuthorizationProviderOAuth2Settings; + /** Authorization Provider name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Identity provider name. Must be 1 to 300 characters long. */ + identityProvider?: string; + /** OAuth2 settings */ + oauth2?: AuthorizationProviderOAuth2Settings; } /** Authorization contract. */ export interface AuthorizationContract extends ProxyResource { - /** Authorization type options */ - authorizationType?: AuthorizationType; - /** OAuth2 grant type options */ - oAuth2GrantType?: OAuth2GrantType; - /** Authorization parameters */ - parameters?: { [propertyName: string]: string }; - /** Authorization error details. */ - error?: AuthorizationError; - /** Status of the Authorization */ - status?: string; + /** Authorization type options */ + authorizationType?: AuthorizationType; + /** OAuth2 grant type options */ + oAuth2GrantType?: OAuth2GrantType; + /** Authorization parameters */ + parameters?: { [propertyName: string]: string }; + /** Authorization error details. */ + error?: AuthorizationError; + /** Status of the Authorization */ + status?: string; } /** Authorization access policy contract. */ export interface AuthorizationAccessPolicyContract extends ProxyResource { - /** The Tenant Id */ - tenantId?: string; - /** The Object Id */ - objectId?: string; + /** The Tenant Id */ + tenantId?: string; + /** The Object Id */ + objectId?: string; } /** Backend details. */ export interface BackendContract extends ProxyResource { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; } /** Reconnect request parameters. */ export interface BackendReconnectContract extends ProxyResource { - /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ - after?: string; + /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ + after?: string; } /** Cache details. */ export interface CacheContract extends ProxyResource { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; } /** Certificate details. */ export interface CertificateContract extends ProxyResource { - /** Subject attribute of the certificate. */ - subject?: string; - /** Thumbprint of the certificate. */ - thumbprint?: string; - /** - * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractProperties; + /** Subject attribute of the certificate. */ + subject?: string; + /** Thumbprint of the certificate. */ + thumbprint?: string; + /** + * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expirationDate?: Date; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractProperties; } /** Content type contract details. */ export interface ContentTypeContract extends ProxyResource { - /** Content type identifier */ - idPropertiesId?: string; - /** Content type name. Must be 1 to 250 characters long. */ - namePropertiesName?: string; - /** Content type description. */ - description?: string; - /** Content type schema. */ - schema?: Record; - /** Content type version. */ - version?: string; + /** Content type identifier */ + idPropertiesId?: string; + /** Content type name. Must be 1 to 250 characters long. */ + namePropertiesName?: string; + /** Content type description. */ + description?: string; + /** Content type schema. */ + schema?: Record; + /** Content type version. */ + version?: string; } /** Content type contract details. */ export interface ContentItemContract extends ProxyResource { - /** Properties of the content item. */ - properties?: { [propertyName: string]: any }; + /** Properties of the content item. */ + properties?: { [propertyName: string]: any }; } /** Deleted API Management Service information. */ export interface DeletedServiceContract extends ProxyResource { - /** - * API Management Service Master Location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** Fully-qualified API Management Service Resource ID */ - serviceId?: string; - /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - scheduledPurgeDate?: Date; - /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - deletionDate?: Date; + /** + * API Management Service Master Location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** Fully-qualified API Management Service Resource ID */ + serviceId?: string; + /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + scheduledPurgeDate?: Date; + /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + deletionDate?: Date; } /** Email Template details. */ export interface EmailTemplateContract extends ProxyResource { - /** Subject of the Template. */ - subject?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** - * Whether the template is the default template provided by API Management or has been edited. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDefault?: boolean; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; + /** Subject of the Template. */ + subject?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** + * Whether the template is the default template provided by API Management or has been edited. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDefault?: boolean; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; } /** Gateway details. */ export interface GatewayContract extends ProxyResource { - /** Gateway location. */ - locationData?: ResourceLocationDataContract; - /** Gateway description */ - description?: string; + /** Gateway location. */ + locationData?: ResourceLocationDataContract; + /** Gateway description */ + description?: string; } /** Gateway hostname configuration details. */ export interface GatewayHostnameConfigurationContract extends ProxyResource { - /** Hostname value. Supports valid domain name, partial or full wildcard */ - hostname?: string; - /** Identifier of Certificate entity that will be used for TLS connection establishment */ - certificateId?: string; - /** Determines whether gateway requests client certificate */ - negotiateClientCertificate?: boolean; - /** Specifies if TLS 1.0 is supported */ - tls10Enabled?: boolean; - /** Specifies if TLS 1.1 is supported */ - tls11Enabled?: boolean; - /** Specifies if HTTP/2.0 is supported */ - http2Enabled?: boolean; + /** Hostname value. Supports valid domain name, partial or full wildcard */ + hostname?: string; + /** Identifier of Certificate entity that will be used for TLS connection establishment */ + certificateId?: string; + /** Determines whether gateway requests client certificate */ + negotiateClientCertificate?: boolean; + /** Specifies if TLS 1.0 is supported */ + tls10Enabled?: boolean; + /** Specifies if TLS 1.1 is supported */ + tls11Enabled?: boolean; + /** Specifies if HTTP/2.0 is supported */ + http2Enabled?: boolean; } /** Association entity details. */ export interface AssociationContract extends ProxyResource { - /** Provisioning state. */ - provisioningState?: "created"; + /** Provisioning state. */ + provisioningState?: "created"; } /** Gateway certificate authority details. */ export interface GatewayCertificateAuthorityContract extends ProxyResource { - /** Determines whether certificate authority is trusted. */ - isTrusted?: boolean; + /** Determines whether certificate authority is trusted. */ + isTrusted?: boolean; } /** Contract details. */ export interface GroupContract extends ProxyResource { - /** Group name. */ - displayName?: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - typePropertiesType?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; + /** Group name. */ + displayName?: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** + * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly builtIn?: boolean; + /** Group type. */ + typePropertiesType?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; } /** User details. */ export interface UserContract extends ProxyResource { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** + * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + registrationDate?: Date; + /** + * Collection of groups user is part of. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groups?: GroupContractProperties[]; } /** Identity Provider details. */ export interface IdentityProviderContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Identity Provider details. */ export interface IdentityProviderCreateContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; } /** Logger details. */ export interface LoggerContract extends ProxyResource { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** - * The name and SendRule connection string of the event hub for azureEventHub logger. - * Instrumentation key for applicationInsights logger. - */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; - /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ - resourceId?: string; + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** + * The name and SendRule connection string of the event hub for azureEventHub logger. + * Instrumentation key for applicationInsights logger. + */ + credentials?: { [propertyName: string]: string }; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; + /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ + resourceId?: string; } /** NamedValue details. */ export interface NamedValueContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; } /** NamedValue details. */ export interface NamedValueCreateContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; } /** Notification details. */ export interface NotificationContract extends ProxyResource { - /** Title of the Notification. */ - title?: string; - /** Description of the Notification. */ - description?: string; - /** Recipient Parameter values. */ - recipients?: RecipientsContractProperties; + /** Title of the Notification. */ + title?: string; + /** Description of the Notification. */ + description?: string; + /** Recipient Parameter values. */ + recipients?: RecipientsContractProperties; } /** Recipient User details. */ export interface RecipientUserContract extends ProxyResource { - /** API Management UserId subscribed to notification. */ - userId?: string; + /** API Management UserId subscribed to notification. */ + userId?: string; } /** Recipient Email details. */ export interface RecipientEmailContract extends ProxyResource { - /** User Email subscribed to notification. */ - email?: string; + /** User Email subscribed to notification. */ + email?: string; } /** OpenId Connect Provider details. */ export interface OpenidConnectProviderContract extends ProxyResource { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; } /** Policy description details. */ export interface PolicyDescriptionContract extends ProxyResource { - /** - * Policy description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Binary OR value of the Snippet scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scope?: number; + /** + * Policy description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Binary OR value of the Snippet scope. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly scope?: number; } /** Policy fragment contract details. */ export interface PolicyFragmentContract extends ProxyResource { - /** Contents of the policy fragment. */ - value?: string; - /** Policy fragment description. */ - description?: string; - /** Format of the policy fragment content. */ - format?: PolicyFragmentContentFormat; + /** Contents of the policy fragment. */ + value?: string; + /** Policy fragment description. */ + description?: string; + /** Format of the policy fragment content. */ + format?: PolicyFragmentContentFormat; } -export interface ResourceCollectionValueItem extends ProxyResource {} +export interface ResourceCollectionValueItem extends ProxyResource { } /** The developer portal configuration contract. */ export interface PortalConfigContract extends ProxyResource { - /** Enable or disable Basic authentication method. */ - enableBasicAuth?: boolean; - signin?: PortalConfigPropertiesSignin; - signup?: PortalConfigPropertiesSignup; - /** The developer portal delegation settings. */ - delegation?: PortalConfigDelegationProperties; - /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ - cors?: PortalConfigCorsProperties; - /** The developer portal Content Security Policy (CSP) settings. */ - csp?: PortalConfigCspProperties; + /** Enable or disable Basic authentication method. */ + enableBasicAuth?: boolean; + signin?: PortalConfigPropertiesSignin; + signup?: PortalConfigPropertiesSignup; + /** The developer portal delegation settings. */ + delegation?: PortalConfigDelegationProperties; + /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ + cors?: PortalConfigCorsProperties; + /** The developer portal Content Security Policy (CSP) settings. */ + csp?: PortalConfigCspProperties; } /** Portal Revision's contract details. */ export interface PortalRevisionContract extends ProxyResource { - /** Portal revision description. */ - description?: string; - /** - * Portal revision publishing status details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusDetails?: string; - /** - * Status of the portal's revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PortalRevisionStatus; - /** Indicates if the portal's revision is public. */ - isCurrent?: boolean; - /** - * Portal's revision creation date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * Last updated date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; + /** Portal revision description. */ + description?: string; + /** + * Portal revision publishing status details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusDetails?: string; + /** + * Status of the portal's revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: PortalRevisionStatus; + /** Indicates if the portal's revision is public. */ + isCurrent?: boolean; + /** + * Portal's revision creation date and time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDateTime?: Date; + /** + * Last updated date and time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedDateTime?: Date; } /** Portal Settings for the Developer Portal. */ export interface PortalSettingsContract extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; } /** Sign-In settings for the Developer Portal. */ export interface PortalSigninSettings extends ProxyResource { - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; } /** Sign-Up settings for a developer portal. */ export interface PortalSignupSettings extends ProxyResource { - /** Allow users to sign up on a developer portal. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; + /** Allow users to sign up on a developer portal. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; } /** Delegation settings for a developer portal. */ export interface PortalDelegationSettings extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; } /** Subscription details. */ export interface SubscriptionContract extends ProxyResource { - /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** The name of the subscription, or null if the subscription has no name. */ - displayName?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** - * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDate?: Date; - /** - * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - startDate?: Date; - /** - * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** - * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - endDate?: Date; - /** - * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - notificationDate?: Date; - /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing is enabled */ - allowTracing?: boolean; + /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** The name of the subscription, or null if the subscription has no name. */ + displayName?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** + * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdDate?: Date; + /** + * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + startDate?: Date; + /** + * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + expirationDate?: Date; + /** + * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + endDate?: Date; + /** + * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + notificationDate?: Date; + /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing is enabled */ + allowTracing?: boolean; } /** Global Schema Contract details. */ export interface GlobalSchemaContract extends ProxyResource { - /** Schema Type. Immutable. */ - schemaType?: SchemaType; - /** Free-form schema entity description. */ - description?: string; - /** Json-encoded string for non json-based schema. */ - value?: any; - /** Global Schema document object for json-based schema formats(e.g. json schema). */ - document?: Record; + /** Schema Type. Immutable. */ + schemaType?: SchemaType; + /** Free-form schema entity description. */ + description?: string; + /** Json-encoded string for non json-based schema. */ + value?: any; + /** Global Schema document object for json-based schema formats(e.g. json schema). */ + document?: Record; } /** Tenant Settings. */ export interface TenantSettingsContract extends ProxyResource { - /** Tenant settings */ - settings?: { [propertyName: string]: string }; + /** Tenant settings */ + settings?: { [propertyName: string]: string }; } /** Tenant Settings. */ export interface AccessInformationContract extends ProxyResource { - /** Access Information type ('access' or 'gitAccess') */ - idPropertiesId?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; + /** Access Information type ('access' or 'gitAccess') */ + idPropertiesId?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; } /** Long Running Git Operation Results. */ export interface OperationResultContract extends ProxyResource { - /** Operation result identifier. */ - idPropertiesId?: string; - /** Status of an async operation. */ - status?: AsyncOperationStatus; - /** - * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: OperationResultLogItemContract[]; + /** Operation result identifier. */ + idPropertiesId?: string; + /** Status of an async operation. */ + status?: AsyncOperationStatus; + /** + * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + started?: Date; + /** + * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** + * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionLog?: OperationResultLogItemContract[]; } /** Result of Tenant Configuration Sync State. */ export interface TenantConfigurationSyncStateContract extends ProxyResource { - /** The name of Git branch. */ - branch?: string; - /** The latest commit Id. */ - commitId?: string; - /** value indicating if last sync was save (true) or deploy (false) operation. */ - isExport?: boolean; - /** value indicating if last synchronization was later than the configuration change. */ - isSynced?: boolean; - /** value indicating whether Git configuration access is enabled. */ - isGitEnabled?: boolean; - /** - * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - syncDate?: Date; - /** - * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - configurationChangeDate?: Date; - /** Most recent tenant configuration operation identifier */ - lastOperationId?: string; + /** The name of Git branch. */ + branch?: string; + /** The latest commit Id. */ + commitId?: string; + /** value indicating if last sync was save (true) or deploy (false) operation. */ + isExport?: boolean; + /** value indicating if last synchronization was later than the configuration change. */ + isSynced?: boolean; + /** value indicating whether Git configuration access is enabled. */ + isGitEnabled?: boolean; + /** + * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + syncDate?: Date; + /** + * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + configurationChangeDate?: Date; + /** Most recent tenant configuration operation identifier */ + lastOperationId?: string; } /** Markdown documentation details. */ export interface DocumentationContract extends ProxyResource { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; } /** Long Running Git Resolver Results. */ export interface ResolverResultContract extends ProxyResource { - /** Resolver result identifier. */ - idPropertiesId?: string; - /** Status of an async resolver. */ - status?: AsyncResolverStatus; - /** - * Start time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate resolver. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy resolver. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: ResolverResultLogItemContract[]; + /** Resolver result identifier. */ + idPropertiesId?: string; + /** Status of an async resolver. */ + status?: AsyncResolverStatus; + /** + * Start time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + started?: Date; + /** + * Last update time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** + * This property if only provided as part of the TenantConfiguration_Validate resolver. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy resolver. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionLog?: ResolverResultLogItemContract[]; } /** Defines headers for Api_getEntityTag operation. */ export interface ApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_get operation. */ export interface ApiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_createOrUpdate operation. */ export interface ApiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Api_update operation. */ export interface ApiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_getEntityTag operation. */ export interface ApiReleaseGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_get operation. */ export interface ApiReleaseGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_createOrUpdate operation. */ export interface ApiReleaseCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiRelease_update operation. */ export interface ApiReleaseUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_getEntityTag operation. */ export interface ApiOperationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_get operation. */ export interface ApiOperationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_createOrUpdate operation. */ export interface ApiOperationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperation_update operation. */ export interface ApiOperationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_getEntityTag operation. */ export interface ApiOperationPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_get operation. */ export interface ApiOperationPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiOperationPolicy_createOrUpdate operation. */ export interface ApiOperationPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByOperation operation. */ export interface TagGetEntityStateByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByOperation operation. */ export interface TagGetByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByApi operation. */ export interface TagGetEntityStateByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByApi operation. */ export interface TagGetByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_assignToApi operation. */ export interface TagAssignToApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityStateByProduct operation. */ export interface TagGetEntityStateByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getByProduct operation. */ export interface TagGetByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_getEntityState operation. */ export interface TagGetEntityStateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_get operation. */ export interface TagGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_createOrUpdate operation. */ export interface TagCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Tag_update operation. */ export interface TagUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_getEntityTag operation. */ export interface GraphQLApiResolverGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_get operation. */ export interface GraphQLApiResolverGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_createOrUpdate operation. */ export interface GraphQLApiResolverCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolver_update operation. */ export interface GraphQLApiResolverUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_getEntityTag operation. */ export interface GraphQLApiResolverPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_get operation. */ export interface GraphQLApiResolverPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GraphQLApiResolverPolicy_createOrUpdate operation. */ export interface GraphQLApiResolverPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_getEntityTag operation. */ export interface ApiPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_get operation. */ export interface ApiPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiPolicy_createOrUpdate operation. */ export interface ApiPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_getEntityTag operation. */ export interface ApiSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_get operation. */ export interface ApiSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiSchema_createOrUpdate operation. */ export interface ApiSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_getEntityTag operation. */ export interface ApiDiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_get operation. */ export interface ApiDiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_createOrUpdate operation. */ export interface ApiDiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiDiagnostic_update operation. */ export interface ApiDiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_getEntityTag operation. */ export interface ApiIssueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_get operation. */ export interface ApiIssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_createOrUpdate operation. */ export interface ApiIssueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssue_update operation. */ export interface ApiIssueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_getEntityTag operation. */ export interface ApiIssueCommentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_get operation. */ export interface ApiIssueCommentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueComment_createOrUpdate operation. */ export interface ApiIssueCommentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_getEntityTag operation. */ export interface ApiIssueAttachmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_get operation. */ export interface ApiIssueAttachmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiIssueAttachment_createOrUpdate operation. */ export interface ApiIssueAttachmentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_getEntityTag operation. */ export interface ApiTagDescriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_get operation. */ export interface ApiTagDescriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiTagDescription_createOrUpdate operation. */ export interface ApiTagDescriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_getEntityTag operation. */ export interface ApiWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_get operation. */ export interface ApiWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_createOrUpdate operation. */ export interface ApiWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiWiki_update operation. */ export interface ApiWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_getEntityTag operation. */ export interface ApiVersionSetGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_get operation. */ export interface ApiVersionSetGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_createOrUpdate operation. */ export interface ApiVersionSetCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ApiVersionSet_update operation. */ export interface ApiVersionSetUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_getEntityTag operation. */ export interface AuthorizationServerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_get operation. */ export interface AuthorizationServerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_createOrUpdate operation. */ export interface AuthorizationServerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_update operation. */ export interface AuthorizationServerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationServer_listSecrets operation. */ export interface AuthorizationServerListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationProvider_get operation. */ export interface AuthorizationProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationProvider_createOrUpdate operation. */ export interface AuthorizationProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_get operation. */ export interface AuthorizationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_createOrUpdate operation. */ export interface AuthorizationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Authorization_confirmConsentCode operation. */ export interface AuthorizationConfirmConsentCodeHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationLoginLinks_post operation. */ export interface AuthorizationLoginLinksPostHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationAccessPolicy_get operation. */ export interface AuthorizationAccessPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for AuthorizationAccessPolicy_createOrUpdate operation. */ export interface AuthorizationAccessPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_getEntityTag operation. */ export interface BackendGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_get operation. */ export interface BackendGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_createOrUpdate operation. */ export interface BackendCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Backend_update operation. */ export interface BackendUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_getEntityTag operation. */ export interface CacheGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_get operation. */ export interface CacheGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_createOrUpdate operation. */ export interface CacheCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Cache_update operation. */ export interface CacheUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_getEntityTag operation. */ export interface CertificateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_get operation. */ export interface CertificateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_createOrUpdate operation. */ export interface CertificateCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Certificate_refreshSecret operation. */ export interface CertificateRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentType_get operation. */ export interface ContentTypeGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentType_createOrUpdate operation. */ export interface ContentTypeCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_getEntityTag operation. */ export interface ContentItemGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_get operation. */ export interface ContentItemGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ContentItem_createOrUpdate operation. */ export interface ContentItemCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DeletedServices_purge operation. */ export interface DeletedServicesPurgeHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_restore operation. */ export interface ApiManagementServiceRestoreHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_backup operation. */ export interface ApiManagementServiceBackupHeaders { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_migrateToStv2 operation. */ export interface ApiManagementServiceMigrateToStv2Headers { - location?: string; + location?: string; } /** Defines headers for ApiManagementService_applyNetworkConfigurationUpdates operation. */ export interface ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders { - location?: string; + location?: string; } /** Defines headers for Diagnostic_getEntityTag operation. */ export interface DiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_get operation. */ export interface DiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_createOrUpdate operation. */ export interface DiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Diagnostic_update operation. */ export interface DiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_getEntityTag operation. */ export interface EmailTemplateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_get operation. */ export interface EmailTemplateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for EmailTemplate_update operation. */ export interface EmailTemplateUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_getEntityTag operation. */ export interface GatewayGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_get operation. */ export interface GatewayGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_createOrUpdate operation. */ export interface GatewayCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_update operation. */ export interface GatewayUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Gateway_listKeys operation. */ export interface GatewayListKeysHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_getEntityTag operation. */ export interface GatewayHostnameConfigurationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_get operation. */ export interface GatewayHostnameConfigurationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayHostnameConfiguration_createOrUpdate operation. */ export interface GatewayHostnameConfigurationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayApi_getEntityTag operation. */ export interface GatewayApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_getEntityTag operation. */ export interface GatewayCertificateAuthorityGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_get operation. */ export interface GatewayCertificateAuthorityGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GatewayCertificateAuthority_createOrUpdate operation. */ export interface GatewayCertificateAuthorityCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_getEntityTag operation. */ export interface GroupGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_get operation. */ export interface GroupGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_createOrUpdate operation. */ export interface GroupCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Group_update operation. */ export interface GroupUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_getEntityTag operation. */ export interface IdentityProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_get operation. */ export interface IdentityProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_createOrUpdate operation. */ export interface IdentityProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_update operation. */ export interface IdentityProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for IdentityProvider_listSecrets operation. */ export interface IdentityProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Issue_get operation. */ export interface IssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_getEntityTag operation. */ export interface LoggerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_get operation. */ export interface LoggerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_createOrUpdate operation. */ export interface LoggerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Logger_update operation. */ export interface LoggerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_getEntityTag operation. */ export interface NamedValueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_get operation. */ export interface NamedValueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_createOrUpdate operation. */ export interface NamedValueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_update operation. */ export interface NamedValueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_listValue operation. */ export interface NamedValueListValueHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for NamedValue_refreshSecret operation. */ export interface NamedValueRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_getEntityTag operation. */ export interface OpenIdConnectProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_get operation. */ export interface OpenIdConnectProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_createOrUpdate operation. */ export interface OpenIdConnectProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_update operation. */ export interface OpenIdConnectProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for OpenIdConnectProvider_listSecrets operation. */ export interface OpenIdConnectProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_getEntityTag operation. */ export interface PolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_get operation. */ export interface PolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Policy_createOrUpdate operation. */ export interface PolicyCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; + /** Current entity state version */ + eTag?: string; } /** Defines headers for PolicyFragment_getEntityTag operation. */ export interface PolicyFragmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PolicyFragment_get operation. */ export interface PolicyFragmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PolicyFragment_createOrUpdate operation. */ export interface PolicyFragmentCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; + /** Current entity state version */ + eTag?: string; } /** Defines headers for PortalConfig_getEntityTag operation. */ export interface PortalConfigGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalConfig_get operation. */ export interface PortalConfigGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_getEntityTag operation. */ export interface PortalRevisionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_get operation. */ export interface PortalRevisionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_createOrUpdate operation. */ export interface PortalRevisionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for PortalRevision_update operation. */ export interface PortalRevisionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignInSettings_getEntityTag operation. */ export interface SignInSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignInSettings_get operation. */ export interface SignInSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignUpSettings_getEntityTag operation. */ export interface SignUpSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for SignUpSettings_get operation. */ export interface SignUpSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DelegationSettings_getEntityTag operation. */ export interface DelegationSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for DelegationSettings_get operation. */ export interface DelegationSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_getEntityTag operation. */ export interface ProductGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_get operation. */ export interface ProductGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_createOrUpdate operation. */ export interface ProductCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Product_update operation. */ export interface ProductUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_getEntityTag operation. */ export interface ProductPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_get operation. */ export interface ProductPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductPolicy_createOrUpdate operation. */ export interface ProductPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_getEntityTag operation. */ export interface ProductWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_get operation. */ export interface ProductWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_createOrUpdate operation. */ export interface ProductWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWiki_update operation. */ export interface ProductWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWikis_list operation. */ export interface ProductWikisListHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for ProductWikis_listNext operation. */ export interface ProductWikisListNextHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_getEntityTag operation. */ export interface GlobalSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_get operation. */ export interface GlobalSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for GlobalSchema_createOrUpdate operation. */ export interface GlobalSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantSettings_get operation. */ export interface TenantSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_getEntityTag operation. */ export interface SubscriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_get operation. */ export interface SubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_createOrUpdate operation. */ export interface SubscriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_update operation. */ export interface SubscriptionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Subscription_listSecrets operation. */ export interface SubscriptionListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_getEntityTag operation. */ export interface TenantAccessGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_get operation. */ export interface TenantAccessGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_create operation. */ export interface TenantAccessCreateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_update operation. */ export interface TenantAccessUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for TenantAccess_listSecrets operation. */ export interface TenantAccessListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_getEntityTag operation. */ export interface UserGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_get operation. */ export interface UserGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_createOrUpdate operation. */ export interface UserCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for User_update operation. */ export interface UserUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for UserSubscription_get operation. */ export interface UserSubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_getEntityTag operation. */ export interface DocumentationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_get operation. */ export interface DocumentationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_createOrUpdate operation. */ export interface DocumentationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Defines headers for Documentation_update operation. */ export interface DocumentationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; + /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ + eTag?: string; } /** Known values of {@link Protocol} that the service accepts. */ export enum KnownProtocol { - /** Http */ - Http = "http", - /** Https */ - Https = "https", - /** Ws */ - Ws = "ws", - /** Wss */ - Wss = "wss" + /** Http */ + Http = "http", + /** Https */ + Https = "https", + /** Ws */ + Ws = "ws", + /** Wss */ + Wss = "wss" } /** @@ -5983,12 +5983,12 @@ export type Protocol = string; /** Known values of {@link ApiVersionSetContractDetailsVersioningScheme} that the service accepts. */ export enum KnownApiVersionSetContractDetailsVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header" + /** The API Version is passed in a path segment. */ + Segment = "Segment", + /** The API Version is passed in a query parameter. */ + Query = "Query", + /** The API Version is passed in a HTTP header. */ + Header = "Header" } /** @@ -6004,10 +6004,10 @@ export type ApiVersionSetContractDetailsVersioningScheme = string; /** Known values of {@link BearerTokenSendingMethods} that the service accepts. */ export enum KnownBearerTokenSendingMethods { - /** Access token will be transmitted in the Authorization header using Bearer schema */ - AuthorizationHeader = "authorizationHeader", - /** Access token will be transmitted as query parameters. */ - Query = "query" + /** Access token will be transmitted in the Authorization header using Bearer schema */ + AuthorizationHeader = "authorizationHeader", + /** Access token will be transmitted as query parameters. */ + Query = "query" } /** @@ -6022,14 +6022,14 @@ export type BearerTokenSendingMethods = string; /** Known values of {@link ApiType} that the service accepts. */ export enum KnownApiType { - /** Http */ - Http = "http", - /** Soap */ - Soap = "soap", - /** Websocket */ - Websocket = "websocket", - /** Graphql */ - Graphql = "graphql" + /** Http */ + Http = "http", + /** Soap */ + Soap = "soap", + /** Websocket */ + Websocket = "websocket", + /** Graphql */ + Graphql = "graphql" } /** @@ -6046,28 +6046,28 @@ export type ApiType = string; /** Known values of {@link ContentFormat} that the service accepts. */ export enum KnownContentFormat { - /** The contents are inline and Content type is a WADL document. */ - WadlXml = "wadl-xml", - /** The WADL document is hosted on a publicly accessible internet address. */ - WadlLinkJson = "wadl-link-json", - /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ - SwaggerJson = "swagger-json", - /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ - SwaggerLinkJson = "swagger-link-json", - /** The contents are inline and the document is a WSDL\/Soap document. */ - Wsdl = "wsdl", - /** The WSDL document is hosted on a publicly accessible internet address. */ - WsdlLink = "wsdl-link", - /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ - Openapi = "openapi", - /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ - OpenapiJson = "openapi+json", - /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ - OpenapiLink = "openapi-link", - /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ - OpenapiJsonLink = "openapi+json-link", - /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ - GraphqlLink = "graphql-link" + /** The contents are inline and Content type is a WADL document. */ + WadlXml = "wadl-xml", + /** The WADL document is hosted on a publicly accessible internet address. */ + WadlLinkJson = "wadl-link-json", + /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ + SwaggerJson = "swagger-json", + /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ + SwaggerLinkJson = "swagger-link-json", + /** The contents are inline and the document is a WSDL\/Soap document. */ + Wsdl = "wsdl", + /** The WSDL document is hosted on a publicly accessible internet address. */ + WsdlLink = "wsdl-link", + /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ + Openapi = "openapi", + /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ + OpenapiJson = "openapi+json", + /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ + OpenapiLink = "openapi-link", + /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ + OpenapiJsonLink = "openapi+json-link", + /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ + GraphqlLink = "graphql-link" } /** @@ -6091,14 +6091,14 @@ export type ContentFormat = string; /** Known values of {@link SoapApiType} that the service accepts. */ export enum KnownSoapApiType { - /** Imports a SOAP API having a RESTful front end. */ - SoapToRest = "http", - /** Imports the SOAP API having a SOAP front end. */ - SoapPassThrough = "soap", - /** Imports the API having a Websocket front end. */ - WebSocket = "websocket", - /** Imports the API having a GraphQL front end. */ - GraphQL = "graphql" + /** Imports a SOAP API having a RESTful front end. */ + SoapToRest = "http", + /** Imports the SOAP API having a SOAP front end. */ + SoapPassThrough = "soap", + /** Imports the API having a Websocket front end. */ + WebSocket = "websocket", + /** Imports the API having a GraphQL front end. */ + GraphQL = "graphql" } /** @@ -6115,10 +6115,10 @@ export type SoapApiType = string; /** Known values of {@link TranslateRequiredQueryParametersConduct} that the service accepts. */ export enum KnownTranslateRequiredQueryParametersConduct { - /** Translates required query parameters to template ones. Is a default value */ - Template = "template", - /** Leaves required query parameters as they are (no translation done). */ - Query = "query" + /** Translates required query parameters to template ones. Is a default value */ + Template = "template", + /** Leaves required query parameters as they are (no translation done). */ + Query = "query" } /** @@ -6133,14 +6133,14 @@ export type TranslateRequiredQueryParametersConduct = string; /** Known values of {@link PolicyContentFormat} that the service accepts. */ export enum KnownPolicyContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ - XmlLink = "xml-link", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml", - /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ - RawxmlLink = "rawxml-link" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ + XmlLink = "xml-link", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml", + /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ + RawxmlLink = "rawxml-link" } /** @@ -6157,8 +6157,8 @@ export type PolicyContentFormat = string; /** Known values of {@link PolicyIdName} that the service accepts. */ export enum KnownPolicyIdName { - /** Policy */ - Policy = "policy" + /** Policy */ + Policy = "policy" } /** @@ -6172,10 +6172,10 @@ export type PolicyIdName = string; /** Known values of {@link PolicyExportFormat} that the service accepts. */ export enum KnownPolicyExportFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml" } /** @@ -6190,8 +6190,8 @@ export type PolicyExportFormat = string; /** Known values of {@link AlwaysLog} that the service accepts. */ export enum KnownAlwaysLog { - /** Always log all erroneous request regardless of sampling settings. */ - AllErrors = "allErrors" + /** Always log all erroneous request regardless of sampling settings. */ + AllErrors = "allErrors" } /** @@ -6205,8 +6205,8 @@ export type AlwaysLog = string; /** Known values of {@link SamplingType} that the service accepts. */ export enum KnownSamplingType { - /** Fixed-rate sampling. */ - Fixed = "fixed" + /** Fixed-rate sampling. */ + Fixed = "fixed" } /** @@ -6220,10 +6220,10 @@ export type SamplingType = string; /** Known values of {@link DataMaskingMode} that the service accepts. */ export enum KnownDataMaskingMode { - /** Mask the value of an entity. */ - Mask = "Mask", - /** Hide the presence of an entity. */ - Hide = "Hide" + /** Mask the value of an entity. */ + Mask = "Mask", + /** Hide the presence of an entity. */ + Hide = "Hide" } /** @@ -6238,12 +6238,12 @@ export type DataMaskingMode = string; /** Known values of {@link HttpCorrelationProtocol} that the service accepts. */ export enum KnownHttpCorrelationProtocol { - /** Do not read and inject correlation headers. */ - None = "None", - /** Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. */ - Legacy = "Legacy", - /** Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. */ - W3C = "W3C" + /** Do not read and inject correlation headers. */ + None = "None", + /** Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. */ + Legacy = "Legacy", + /** Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. */ + W3C = "W3C" } /** @@ -6259,12 +6259,12 @@ export type HttpCorrelationProtocol = string; /** Known values of {@link Verbosity} that the service accepts. */ export enum KnownVerbosity { - /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ - Verbose = "verbose", - /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ - Information = "information", - /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ - Error = "error" + /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ + Verbose = "verbose", + /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ + Information = "information", + /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ + Error = "error" } /** @@ -6280,10 +6280,10 @@ export type Verbosity = string; /** Known values of {@link OperationNameFormat} that the service accepts. */ export enum KnownOperationNameFormat { - /** API_NAME;rev=API_REVISION - OPERATION_NAME */ - Name = "Name", - /** HTTP_VERB URL */ - Url = "Url" + /** API_NAME;rev=API_REVISION - OPERATION_NAME */ + Name = "Name", + /** HTTP_VERB URL */ + Url = "Url" } /** @@ -6298,16 +6298,16 @@ export type OperationNameFormat = string; /** Known values of {@link State} that the service accepts. */ export enum KnownState { - /** The issue is proposed. */ - Proposed = "proposed", - /** The issue is opened. */ - Open = "open", - /** The issue was removed. */ - Removed = "removed", - /** The issue is now resolved. */ - Resolved = "resolved", - /** The issue was closed. */ - Closed = "closed" + /** The issue is proposed. */ + Proposed = "proposed", + /** The issue is opened. */ + Open = "open", + /** The issue was removed. */ + Removed = "removed", + /** The issue is now resolved. */ + Resolved = "resolved", + /** The issue was closed. */ + Closed = "closed" } /** @@ -6325,16 +6325,16 @@ export type State = string; /** Known values of {@link ExportFormat} that the service accepts. */ export enum KnownExportFormat { - /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ - Swagger = "swagger-link", - /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link", - /** Export the Api Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ - Openapi = "openapi-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ - OpenapiJson = "openapi+json-link" + /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ + Swagger = "swagger-link", + /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link", + /** Export the Api Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ + Openapi = "openapi-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ + OpenapiJson = "openapi+json-link" } /** @@ -6352,8 +6352,8 @@ export type ExportFormat = string; /** Known values of {@link ExportApi} that the service accepts. */ export enum KnownExportApi { - /** True */ - True = "true" + /** True */ + True = "true" } /** @@ -6367,14 +6367,14 @@ export type ExportApi = string; /** Known values of {@link ExportResultFormat} that the service accepts. */ export enum KnownExportResultFormat { - /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ - Swagger = "swagger-link-json", - /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link+xml", - /** Export the API Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link-json", - /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ - OpenApi = "openapi-link" + /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ + Swagger = "swagger-link-json", + /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link+xml", + /** Export the API Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link-json", + /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ + OpenApi = "openapi-link" } /** @@ -6391,12 +6391,12 @@ export type ExportResultFormat = string; /** Known values of {@link VersioningScheme} that the service accepts. */ export enum KnownVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header" + /** The API Version is passed in a path segment. */ + Segment = "Segment", + /** The API Version is passed in a query parameter. */ + Query = "Query", + /** The API Version is passed in a HTTP header. */ + Header = "Header" } /** @@ -6412,14 +6412,14 @@ export type VersioningScheme = string; /** Known values of {@link GrantType} that the service accepts. */ export enum KnownGrantType { - /** Authorization Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.1. */ - AuthorizationCode = "authorizationCode", - /** Implicit Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.2. */ - Implicit = "implicit", - /** Resource Owner Password Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.3. */ - ResourceOwnerPassword = "resourceOwnerPassword", - /** Client Credentials Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.4. */ - ClientCredentials = "clientCredentials" + /** Authorization Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.1. */ + AuthorizationCode = "authorizationCode", + /** Implicit Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.2. */ + Implicit = "implicit", + /** Resource Owner Password Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.3. */ + ResourceOwnerPassword = "resourceOwnerPassword", + /** Client Credentials Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.4. */ + ClientCredentials = "clientCredentials" } /** @@ -6436,10 +6436,10 @@ export type GrantType = string; /** Known values of {@link ClientAuthenticationMethod} that the service accepts. */ export enum KnownClientAuthenticationMethod { - /** Basic Client Authentication method. */ - Basic = "Basic", - /** Body based Authentication method. */ - Body = "Body" + /** Basic Client Authentication method. */ + Basic = "Basic", + /** Body based Authentication method. */ + Body = "Body" } /** @@ -6454,10 +6454,10 @@ export type ClientAuthenticationMethod = string; /** Known values of {@link BearerTokenSendingMethod} that the service accepts. */ export enum KnownBearerTokenSendingMethod { - /** AuthorizationHeader */ - AuthorizationHeader = "authorizationHeader", - /** Query */ - Query = "query" + /** AuthorizationHeader */ + AuthorizationHeader = "authorizationHeader", + /** Query */ + Query = "query" } /** @@ -6472,8 +6472,8 @@ export type BearerTokenSendingMethod = string; /** Known values of {@link AuthorizationType} that the service accepts. */ export enum KnownAuthorizationType { - /** OAuth2 authorization type */ - OAuth2 = "OAuth2" + /** OAuth2 authorization type */ + OAuth2 = "OAuth2" } /** @@ -6487,10 +6487,10 @@ export type AuthorizationType = string; /** Known values of {@link OAuth2GrantType} that the service accepts. */ export enum KnownOAuth2GrantType { - /** Authorization Code grant */ - AuthorizationCode = "AuthorizationCode", - /** Client Credential grant */ - ClientCredentials = "ClientCredentials" + /** Authorization Code grant */ + AuthorizationCode = "AuthorizationCode", + /** Client Credential grant */ + ClientCredentials = "ClientCredentials" } /** @@ -6505,10 +6505,10 @@ export type OAuth2GrantType = string; /** Known values of {@link BackendProtocol} that the service accepts. */ export enum KnownBackendProtocol { - /** The Backend is a RESTful service. */ - Http = "http", - /** The Backend is a SOAP service. */ - Soap = "soap" + /** The Backend is a RESTful service. */ + Http = "http", + /** The Backend is a SOAP service. */ + Soap = "soap" } /** @@ -6523,8 +6523,8 @@ export type BackendProtocol = string; /** Known values of {@link PreferredIPVersion} that the service accepts. */ export enum KnownPreferredIPVersion { - /** IPv4 */ - IPv4 = "IPv4" + /** IPv4 */ + IPv4 = "IPv4" } /** @@ -6538,12 +6538,12 @@ export type PreferredIPVersion = string; /** Known values of {@link ConnectivityCheckProtocol} that the service accepts. */ export enum KnownConnectivityCheckProtocol { - /** TCP */ - TCP = "TCP", - /** Http */ - Http = "HTTP", - /** Https */ - Https = "HTTPS" + /** TCP */ + TCP = "TCP", + /** Http */ + Http = "HTTP", + /** Https */ + Https = "HTTPS" } /** @@ -6559,10 +6559,10 @@ export type ConnectivityCheckProtocol = string; /** Known values of {@link Method} that the service accepts. */ export enum KnownMethod { - /** GET */ - GET = "GET", - /** Post */ - Post = "POST" + /** GET */ + GET = "GET", + /** Post */ + Post = "POST" } /** @@ -6577,12 +6577,12 @@ export type Method = string; /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { - /** Local */ - Local = "Local", - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound" + /** Local */ + Local = "Local", + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound" } /** @@ -6598,10 +6598,10 @@ export type Origin = string; /** Known values of {@link Severity} that the service accepts. */ export enum KnownSeverity { - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning" + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning" } /** @@ -6616,24 +6616,24 @@ export type Severity = string; /** Known values of {@link IssueType} that the service accepts. */ export enum KnownIssueType { - /** Unknown */ - Unknown = "Unknown", - /** AgentStopped */ - AgentStopped = "AgentStopped", - /** GuestFirewall */ - GuestFirewall = "GuestFirewall", - /** DnsResolution */ - DnsResolution = "DnsResolution", - /** SocketBind */ - SocketBind = "SocketBind", - /** NetworkSecurityRule */ - NetworkSecurityRule = "NetworkSecurityRule", - /** UserDefinedRoute */ - UserDefinedRoute = "UserDefinedRoute", - /** PortThrottled */ - PortThrottled = "PortThrottled", - /** Platform */ - Platform = "Platform" + /** Unknown */ + Unknown = "Unknown", + /** AgentStopped */ + AgentStopped = "AgentStopped", + /** GuestFirewall */ + GuestFirewall = "GuestFirewall", + /** DnsResolution */ + DnsResolution = "DnsResolution", + /** SocketBind */ + SocketBind = "SocketBind", + /** NetworkSecurityRule */ + NetworkSecurityRule = "NetworkSecurityRule", + /** UserDefinedRoute */ + UserDefinedRoute = "UserDefinedRoute", + /** PortThrottled */ + PortThrottled = "PortThrottled", + /** Platform */ + Platform = "Platform" } /** @@ -6655,14 +6655,14 @@ export type IssueType = string; /** Known values of {@link ConnectionStatus} that the service accepts. */ export enum KnownConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Degraded */ - Degraded = "Degraded" + /** Unknown */ + Unknown = "Unknown", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", + /** Degraded */ + Degraded = "Degraded" } /** @@ -6679,18 +6679,18 @@ export type ConnectionStatus = string; /** Known values of {@link SkuType} that the service accepts. */ export enum KnownSkuType { - /** Developer SKU of Api Management. */ - Developer = "Developer", - /** Standard SKU of Api Management. */ - Standard = "Standard", - /** Premium SKU of Api Management. */ - Premium = "Premium", - /** Basic SKU of Api Management. */ - Basic = "Basic", - /** Consumption SKU of Api Management. */ - Consumption = "Consumption", - /** Isolated SKU of Api Management. */ - Isolated = "Isolated" + /** Developer SKU of Api Management. */ + Developer = "Developer", + /** Standard SKU of Api Management. */ + Standard = "Standard", + /** Premium SKU of Api Management. */ + Premium = "Premium", + /** Basic SKU of Api Management. */ + Basic = "Basic", + /** Consumption SKU of Api Management. */ + Consumption = "Consumption", + /** Isolated SKU of Api Management. */ + Isolated = "Isolated" } /** @@ -6709,12 +6709,12 @@ export type SkuType = string; /** Known values of {@link ResourceSkuCapacityScaleType} that the service accepts. */ export enum KnownResourceSkuCapacityScaleType { - /** Supported scale type automatic. */ - Automatic = "automatic", - /** Supported scale type manual. */ - Manual = "manual", - /** Scaling not supported. */ - None = "none" + /** Supported scale type automatic. */ + Automatic = "automatic", + /** Supported scale type manual. */ + Manual = "manual", + /** Scaling not supported. */ + None = "none" } /** @@ -6730,12 +6730,12 @@ export type ResourceSkuCapacityScaleType = string; /** Known values of {@link AccessType} that the service accepts. */ export enum KnownAccessType { - /** Use access key. */ - AccessKey = "AccessKey", - /** Use system assigned managed identity. */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** Use user assigned managed identity. */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" + /** Use access key. */ + AccessKey = "AccessKey", + /** Use system assigned managed identity. */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** Use user assigned managed identity. */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" } /** @@ -6751,16 +6751,16 @@ export type AccessType = string; /** Known values of {@link HostnameType} that the service accepts. */ export enum KnownHostnameType { - /** Proxy */ - Proxy = "Proxy", - /** Portal */ - Portal = "Portal", - /** Management */ - Management = "Management", - /** Scm */ - Scm = "Scm", - /** DeveloperPortal */ - DeveloperPortal = "DeveloperPortal" + /** Proxy */ + Proxy = "Proxy", + /** Portal */ + Portal = "Portal", + /** Management */ + Management = "Management", + /** Scm */ + Scm = "Scm", + /** DeveloperPortal */ + DeveloperPortal = "DeveloperPortal" } /** @@ -6778,14 +6778,14 @@ export type HostnameType = string; /** Known values of {@link CertificateSource} that the service accepts. */ export enum KnownCertificateSource { - /** Managed */ - Managed = "Managed", - /** KeyVault */ - KeyVault = "KeyVault", - /** Custom */ - Custom = "Custom", - /** BuiltIn */ - BuiltIn = "BuiltIn" + /** Managed */ + Managed = "Managed", + /** KeyVault */ + KeyVault = "KeyVault", + /** Custom */ + Custom = "Custom", + /** BuiltIn */ + BuiltIn = "BuiltIn" } /** @@ -6802,12 +6802,12 @@ export type CertificateSource = string; /** Known values of {@link CertificateStatus} that the service accepts. */ export enum KnownCertificateStatus { - /** Completed */ - Completed = "Completed", - /** Failed */ - Failed = "Failed", - /** InProgress */ - InProgress = "InProgress" + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress" } /** @@ -6823,10 +6823,10 @@ export type CertificateStatus = string; /** Known values of {@link PublicNetworkAccess} that the service accepts. */ export enum KnownPublicNetworkAccess { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** @@ -6841,10 +6841,10 @@ export type PublicNetworkAccess = string; /** Known values of {@link NatGatewayState} that the service accepts. */ export enum KnownNatGatewayState { - /** Nat Gateway is enabled for the service. */ - Enabled = "Enabled", - /** Nat Gateway is disabled for the service. */ - Disabled = "Disabled" + /** Nat Gateway is enabled for the service. */ + Enabled = "Enabled", + /** Nat Gateway is disabled for the service. */ + Disabled = "Disabled" } /** @@ -6859,14 +6859,14 @@ export type NatGatewayState = string; /** Known values of {@link PlatformVersion} that the service accepts. */ export enum KnownPlatformVersion { - /** Platform version cannot be determined, as compute platform is not deployed. */ - Undetermined = "undetermined", - /** Platform running the service on Single Tenant V1 platform. */ - Stv1 = "stv1", - /** Platform running the service on Single Tenant V2 platform. */ - Stv2 = "stv2", - /** Platform running the service on Multi Tenant V1 platform. */ - Mtv1 = "mtv1" + /** Platform version cannot be determined, as compute platform is not deployed. */ + Undetermined = "undetermined", + /** Platform running the service on Single Tenant V1 platform. */ + Stv1 = "stv1", + /** Platform running the service on Single Tenant V2 platform. */ + Stv2 = "stv2", + /** Platform running the service on Multi Tenant V1 platform. */ + Mtv1 = "mtv1" } /** @@ -6883,10 +6883,10 @@ export type PlatformVersion = string; /** Known values of {@link CertificateConfigurationStoreName} that the service accepts. */ export enum KnownCertificateConfigurationStoreName { - /** CertificateAuthority */ - CertificateAuthority = "CertificateAuthority", - /** Root */ - Root = "Root" + /** CertificateAuthority */ + CertificateAuthority = "CertificateAuthority", + /** Root */ + Root = "Root" } /** @@ -6901,12 +6901,12 @@ export type CertificateConfigurationStoreName = string; /** Known values of {@link VirtualNetworkType} that the service accepts. */ export enum KnownVirtualNetworkType { - /** The service is not part of any Virtual Network. */ - None = "None", - /** The service is part of Virtual Network and it is accessible from Internet. */ - External = "External", - /** The service is part of Virtual Network and it is only accessible from within the virtual network. */ - Internal = "Internal" + /** The service is not part of any Virtual Network. */ + None = "None", + /** The service is part of Virtual Network and it is accessible from Internet. */ + External = "External", + /** The service is part of Virtual Network and it is only accessible from within the virtual network. */ + Internal = "Internal" } /** @@ -6922,12 +6922,12 @@ export type VirtualNetworkType = string; /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointServiceConnectionStatus { - /** Pending */ - Pending = "Pending", - /** Approved */ - Approved = "Approved", - /** Rejected */ - Rejected = "Rejected" + /** Pending */ + Pending = "Pending", + /** Approved */ + Approved = "Approved", + /** Rejected */ + Rejected = "Rejected" } /** @@ -6943,14 +6943,14 @@ export type PrivateEndpointServiceConnectionStatus = string; /** Known values of {@link ApimIdentityType} that the service accepts. */ export enum KnownApimIdentityType { - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", - /** None */ - None = "None" + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + /** None */ + None = "None" } /** @@ -6967,14 +6967,14 @@ export type ApimIdentityType = 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" + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" } /** @@ -6991,34 +6991,34 @@ export type CreatedByType = string; /** Known values of {@link TemplateName} that the service accepts. */ export enum KnownTemplateName { - /** ApplicationApprovedNotificationMessage */ - ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", - /** AccountClosedDeveloper */ - AccountClosedDeveloper = "accountClosedDeveloper", - /** QuotaLimitApproachingDeveloperNotificationMessage */ - QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", - /** NewDeveloperNotificationMessage */ - NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", - /** EmailChangeIdentityDefault */ - EmailChangeIdentityDefault = "emailChangeIdentityDefault", - /** InviteUserNotificationMessage */ - InviteUserNotificationMessage = "inviteUserNotificationMessage", - /** NewCommentNotificationMessage */ - NewCommentNotificationMessage = "newCommentNotificationMessage", - /** ConfirmSignUpIdentityDefault */ - ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", - /** NewIssueNotificationMessage */ - NewIssueNotificationMessage = "newIssueNotificationMessage", - /** PurchaseDeveloperNotificationMessage */ - PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", - /** PasswordResetIdentityDefault */ - PasswordResetIdentityDefault = "passwordResetIdentityDefault", - /** PasswordResetByAdminNotificationMessage */ - PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", - /** RejectDeveloperNotificationMessage */ - RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", - /** RequestDeveloperNotificationMessage */ - RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" + /** ApplicationApprovedNotificationMessage */ + ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", + /** AccountClosedDeveloper */ + AccountClosedDeveloper = "accountClosedDeveloper", + /** QuotaLimitApproachingDeveloperNotificationMessage */ + QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", + /** NewDeveloperNotificationMessage */ + NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", + /** EmailChangeIdentityDefault */ + EmailChangeIdentityDefault = "emailChangeIdentityDefault", + /** InviteUserNotificationMessage */ + InviteUserNotificationMessage = "inviteUserNotificationMessage", + /** NewCommentNotificationMessage */ + NewCommentNotificationMessage = "newCommentNotificationMessage", + /** ConfirmSignUpIdentityDefault */ + ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", + /** NewIssueNotificationMessage */ + NewIssueNotificationMessage = "newIssueNotificationMessage", + /** PurchaseDeveloperNotificationMessage */ + PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", + /** PasswordResetIdentityDefault */ + PasswordResetIdentityDefault = "passwordResetIdentityDefault", + /** PasswordResetByAdminNotificationMessage */ + PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", + /** RejectDeveloperNotificationMessage */ + RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", + /** RequestDeveloperNotificationMessage */ + RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" } /** @@ -7045,14 +7045,14 @@ export type TemplateName = string; /** Known values of {@link UserState} that the service accepts. */ export enum KnownUserState { - /** User state is active. */ - Active = "active", - /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ - Blocked = "blocked", - /** User account is pending. Requires identity confirmation before it can be made active. */ - Pending = "pending", - /** User account is closed. All identities and related entities are removed. */ - Deleted = "deleted" + /** User state is active. */ + Active = "active", + /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ + Blocked = "blocked", + /** User account is pending. Requires identity confirmation before it can be made active. */ + Pending = "pending", + /** User account is closed. All identities and related entities are removed. */ + Deleted = "deleted" } /** @@ -7069,18 +7069,18 @@ export type UserState = string; /** Known values of {@link IdentityProviderType} that the service accepts. */ export enum KnownIdentityProviderType { - /** Facebook as Identity provider. */ - Facebook = "facebook", - /** Google as Identity provider. */ - Google = "google", - /** Microsoft Live as Identity provider. */ - Microsoft = "microsoft", - /** Twitter as Identity provider. */ - Twitter = "twitter", - /** Azure Active Directory as Identity provider. */ - Aad = "aad", - /** Azure Active Directory B2C as Identity provider. */ - AadB2C = "aadB2C" + /** Facebook as Identity provider. */ + Facebook = "facebook", + /** Google as Identity provider. */ + Google = "google", + /** Microsoft Live as Identity provider. */ + Microsoft = "microsoft", + /** Twitter as Identity provider. */ + Twitter = "twitter", + /** Azure Active Directory as Identity provider. */ + Aad = "aad", + /** Azure Active Directory B2C as Identity provider. */ + AadB2C = "aadB2C" } /** @@ -7099,12 +7099,12 @@ export type IdentityProviderType = string; /** Known values of {@link LoggerType} that the service accepts. */ export enum KnownLoggerType { - /** Azure Event Hub as log destination. */ - AzureEventHub = "azureEventHub", - /** Azure Application Insights as log destination. */ - ApplicationInsights = "applicationInsights", - /** Azure Monitor */ - AzureMonitor = "azureMonitor" + /** Azure Event Hub as log destination. */ + AzureEventHub = "azureEventHub", + /** Azure Application Insights as log destination. */ + ApplicationInsights = "applicationInsights", + /** Azure Monitor */ + AzureMonitor = "azureMonitor" } /** @@ -7120,12 +7120,12 @@ export type LoggerType = string; /** Known values of {@link ConnectivityStatusType} that the service accepts. */ export enum KnownConnectivityStatusType { - /** Initializing */ - Initializing = "initializing", - /** Success */ - Success = "success", - /** Failure */ - Failure = "failure" + /** Initializing */ + Initializing = "initializing", + /** Success */ + Success = "success", + /** Failure */ + Failure = "failure" } /** @@ -7141,20 +7141,20 @@ export type ConnectivityStatusType = string; /** Known values of {@link NotificationName} that the service accepts. */ export enum KnownNotificationName { - /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ - RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", - /** The following email recipients and users will receive email notifications about new API product subscriptions. */ - PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ - NewApplicationNotificationMessage = "NewApplicationNotificationMessage", - /** The following recipients will receive blind carbon copies of all emails sent to developers. */ - BCC = "BCC", - /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ - NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when developer closes his account. */ - AccountClosedPublisher = "AccountClosedPublisher", - /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ - QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage" + /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ + RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", + /** The following email recipients and users will receive email notifications about new API product subscriptions. */ + PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ + NewApplicationNotificationMessage = "NewApplicationNotificationMessage", + /** The following recipients will receive blind carbon copies of all emails sent to developers. */ + BCC = "BCC", + /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ + NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when developer closes his account. */ + AccountClosedPublisher = "AccountClosedPublisher", + /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ + QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage" } /** @@ -7174,10 +7174,10 @@ export type NotificationName = string; /** Known values of {@link PolicyFragmentContentFormat} that the service accepts. */ export enum KnownPolicyFragmentContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml" + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml" } /** @@ -7192,12 +7192,12 @@ export type PolicyFragmentContentFormat = string; /** Known values of {@link PortalSettingsCspMode} that the service accepts. */ export enum KnownPortalSettingsCspMode { - /** The browser will block requests not matching allowed origins. */ - Enabled = "enabled", - /** The browser will not apply the origin restrictions. */ - Disabled = "disabled", - /** The browser will report requests not matching allowed origins without blocking them. */ - ReportOnly = "reportOnly" + /** The browser will block requests not matching allowed origins. */ + Enabled = "enabled", + /** The browser will not apply the origin restrictions. */ + Disabled = "disabled", + /** The browser will report requests not matching allowed origins without blocking them. */ + ReportOnly = "reportOnly" } /** @@ -7213,14 +7213,14 @@ export type PortalSettingsCspMode = string; /** Known values of {@link PortalRevisionStatus} that the service accepts. */ export enum KnownPortalRevisionStatus { - /** Portal's revision has been queued. */ - Pending = "pending", - /** Portal's revision is being published. */ - Publishing = "publishing", - /** Portal's revision publishing completed. */ - Completed = "completed", - /** Portal's revision publishing failed. */ - Failed = "failed" + /** Portal's revision has been queued. */ + Pending = "pending", + /** Portal's revision is being published. */ + Publishing = "publishing", + /** Portal's revision publishing completed. */ + Completed = "completed", + /** Portal's revision publishing failed. */ + Failed = "failed" } /** @@ -7237,14 +7237,14 @@ export type PortalRevisionStatus = string; /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ export enum KnownPrivateEndpointConnectionProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed" + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed" } /** @@ -7261,10 +7261,10 @@ export type PrivateEndpointConnectionProvisioningState = string; /** Known values of {@link SchemaType} that the service accepts. */ export enum KnownSchemaType { - /** XML schema type. */ - Xml = "xml", - /** Json schema type. */ - Json = "json" + /** XML schema type. */ + Xml = "xml", + /** Json schema type. */ + Json = "json" } /** @@ -7279,8 +7279,8 @@ export type SchemaType = string; /** Known values of {@link SettingsTypeName} that the service accepts. */ export enum KnownSettingsTypeName { - /** Public */ - Public = "public" + /** Public */ + Public = "public" } /** @@ -7294,10 +7294,10 @@ export type SettingsTypeName = string; /** Known values of {@link AppType} that the service accepts. */ export enum KnownAppType { - /** User create request was sent by legacy developer portal. */ - Portal = "portal", - /** User create request was sent by new developer portal. */ - DeveloperPortal = "developerPortal" + /** User create request was sent by legacy developer portal. */ + Portal = "portal", + /** User create request was sent by new developer portal. */ + DeveloperPortal = "developerPortal" } /** @@ -7312,10 +7312,10 @@ export type AppType = string; /** Known values of {@link AccessIdName} that the service accepts. */ export enum KnownAccessIdName { - /** Access */ - Access = "access", - /** GitAccess */ - GitAccess = "gitAccess" + /** Access */ + Access = "access", + /** GitAccess */ + GitAccess = "gitAccess" } /** @@ -7330,8 +7330,8 @@ export type AccessIdName = string; /** Known values of {@link ConfigurationIdName} that the service accepts. */ export enum KnownConfigurationIdName { - /** Configuration */ - Configuration = "configuration" + /** Configuration */ + Configuration = "configuration" } /** @@ -7345,10 +7345,10 @@ export type ConfigurationIdName = string; /** Known values of {@link Confirmation} that the service accepts. */ export enum KnownConfirmation { - /** Send an e-mail to the user confirming they have successfully signed up. */ - Signup = "signup", - /** Send an e-mail inviting the user to sign-up and complete registration. */ - Invite = "invite" + /** Send an e-mail to the user confirming they have successfully signed up. */ + Signup = "signup", + /** Send an e-mail inviting the user to sign-up and complete registration. */ + Invite = "invite" } /** @@ -7364,14 +7364,14 @@ export type Confirmation = string; export type ProductState = "notPublished" | "published"; /** Defines values for AuthorizationMethod. */ export type AuthorizationMethod = - | "HEAD" - | "OPTIONS" - | "TRACE" - | "GET" - | "POST" - | "PUT" - | "PATCH" - | "DELETE"; + | "HEAD" + | "OPTIONS" + | "TRACE" + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE"; /** Defines values for NameAvailabilityReason. */ export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; /** Defines values for KeyType. */ @@ -7380,53 +7380,53 @@ export type KeyType = "primary" | "secondary"; export type GroupType = "custom" | "system" | "external"; /** Defines values for PolicyScopeContract. */ export type PolicyScopeContract = - | "Tenant" - | "Product" - | "Api" - | "Operation" - | "All"; + | "Tenant" + | "Product" + | "Api" + | "Operation" + | "All"; /** Defines values for SubscriptionState. */ export type SubscriptionState = - | "suspended" - | "active" - | "expired" - | "submitted" - | "rejected" - | "cancelled"; + | "suspended" + | "active" + | "expired" + | "submitted" + | "rejected" + | "cancelled"; /** Defines values for ApiManagementSkuCapacityScaleType. */ export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; /** Defines values for ApiManagementSkuRestrictionsType. */ export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; /** Defines values for ApiManagementSkuRestrictionsReasonCode. */ export type ApiManagementSkuRestrictionsReasonCode = - | "QuotaId" - | "NotAvailableForSubscription"; + | "QuotaId" + | "NotAvailableForSubscription"; /** Defines values for AsyncOperationStatus. */ export type AsyncOperationStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; + | "Started" + | "InProgress" + | "Succeeded" + | "Failed"; /** Defines values for AsyncResolverStatus. */ export type AsyncResolverStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; + | "Started" + | "InProgress" + | "Succeeded" + | "Failed"; /** Optional parameters. */ export interface ApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; - /** Include full ApiVersionSet resource in response */ - expandApiVersionSet?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; + /** Include full ApiVersionSet resource in response */ + expandApiVersionSet?: boolean; } /** Contains response data for the listByService operation. */ @@ -7434,54 +7434,54 @@ export type ApiListByServiceResponse = ApiCollection; /** Optional parameters. */ export interface ApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiGetEntityTagResponse = ApiGetEntityTagHeaders; /** Optional parameters. */ -export interface ApiGetOptionalParams extends coreClient.OperationOptions {} +export interface ApiGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiGetResponse = ApiGetHeaders & ApiContract; /** Optional parameters. */ export interface ApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** 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; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** 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 ApiCreateOrUpdateResponse = ApiCreateOrUpdateHeaders & ApiContract; /** Optional parameters. */ -export interface ApiUpdateOptionalParams extends coreClient.OperationOptions {} +export interface ApiUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiUpdateResponse = ApiUpdateHeaders & ApiContract; /** Optional parameters. */ export interface ApiDeleteOptionalParams extends coreClient.OperationOptions { - /** Delete all revisions of the Api. */ - deleteRevisions?: boolean; + /** Delete all revisions of the Api. */ + deleteRevisions?: boolean; } /** Optional parameters. */ export interface ApiListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged APIs. */ - includeNotTaggedApis?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged APIs. */ + includeNotTaggedApis?: boolean; } /** Contains response data for the listByTags operation. */ @@ -7489,27 +7489,27 @@ export type ApiListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiListByServiceNextResponse = ApiCollection; /** Optional parameters. */ export interface ApiListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type ApiListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -7517,20 +7517,20 @@ export type ApiRevisionListByServiceResponse = ApiRevisionCollection; /** Optional parameters. */ export interface ApiRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiRevisionListByServiceNextResponse = ApiRevisionCollection; /** Optional parameters. */ export interface ApiReleaseListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -7538,59 +7538,59 @@ export type ApiReleaseListByServiceResponse = ApiReleaseCollection; /** Optional parameters. */ export interface ApiReleaseGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiReleaseGetEntityTagResponse = ApiReleaseGetEntityTagHeaders; /** Optional parameters. */ export interface ApiReleaseGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiReleaseGetResponse = ApiReleaseGetHeaders & ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiReleaseCreateOrUpdateResponse = ApiReleaseCreateOrUpdateHeaders & - ApiReleaseContract; + ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiReleaseUpdateResponse = ApiReleaseUpdateHeaders & - ApiReleaseContract; + ApiReleaseContract; /** Optional parameters. */ export interface ApiReleaseDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiReleaseListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiReleaseListByServiceNextResponse = ApiReleaseCollection; /** Optional parameters. */ export interface ApiOperationListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; } /** Contains response data for the listByApi operation. */ @@ -7598,98 +7598,98 @@ export type ApiOperationListByApiResponse = OperationCollection; /** Optional parameters. */ export interface ApiOperationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiOperationGetEntityTagResponse = ApiOperationGetEntityTagHeaders; /** Optional parameters. */ export interface ApiOperationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiOperationGetResponse = ApiOperationGetHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiOperationCreateOrUpdateResponse = ApiOperationCreateOrUpdateHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiOperationUpdateResponse = ApiOperationUpdateHeaders & - OperationContract; + OperationContract; /** Optional parameters. */ export interface ApiOperationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiOperationListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ApiOperationListByApiNextResponse = OperationCollection; /** Optional parameters. */ export interface ApiOperationPolicyListByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperation operation. */ export type ApiOperationPolicyListByOperationResponse = PolicyCollection; /** Optional parameters. */ export interface ApiOperationPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiOperationPolicyGetEntityTagResponse = ApiOperationPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ApiOperationPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ export type ApiOperationPolicyGetResponse = ApiOperationPolicyGetHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiOperationPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiOperationPolicyCreateOrUpdateResponse = ApiOperationPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiOperationPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByOperationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByOperation operation. */ @@ -7697,38 +7697,38 @@ export type TagListByOperationResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByOperation operation. */ export type TagGetEntityStateByOperationResponse = TagGetEntityStateByOperationHeaders; /** Optional parameters. */ export interface TagGetByOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByOperation operation. */ export type TagGetByOperationResponse = TagGetByOperationHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToOperation operation. */ export type TagAssignToOperationResponse = TagContract; /** Optional parameters. */ export interface TagDetachFromOperationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -7736,38 +7736,38 @@ export type TagListByApiResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByApi operation. */ export type TagGetEntityStateByApiResponse = TagGetEntityStateByApiHeaders; /** Optional parameters. */ export interface TagGetByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByApi operation. */ export type TagGetByApiResponse = TagGetByApiHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToApi operation. */ export type TagAssignToApiResponse = TagAssignToApiHeaders & TagContract; /** Optional parameters. */ export interface TagDetachFromApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -7775,40 +7775,40 @@ export type TagListByProductResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityStateByProduct operation. */ export type TagGetEntityStateByProductResponse = TagGetEntityStateByProductHeaders; /** Optional parameters. */ export interface TagGetByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByProduct operation. */ export type TagGetByProductResponse = TagGetByProductHeaders & TagContract; /** Optional parameters. */ export interface TagAssignToProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the assignToProduct operation. */ export type TagAssignToProductResponse = TagContract; /** Optional parameters. */ export interface TagDetachFromProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Scope like 'apis', 'products' or 'apis/{apiId} */ - scope?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Scope like 'apis', 'products' or 'apis/{apiId} */ + scope?: string; } /** Contains response data for the listByService operation. */ @@ -7816,73 +7816,73 @@ export type TagListByServiceResponse = TagCollection; /** Optional parameters. */ export interface TagGetEntityStateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityState operation. */ export type TagGetEntityStateResponse = TagGetEntityStateHeaders; /** Optional parameters. */ -export interface TagGetOptionalParams extends coreClient.OperationOptions {} +export interface TagGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TagGetResponse = TagGetHeaders & TagContract; /** Optional parameters. */ export interface TagCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type TagCreateOrUpdateResponse = TagCreateOrUpdateHeaders & TagContract; /** Optional parameters. */ -export interface TagUpdateOptionalParams extends coreClient.OperationOptions {} +export interface TagUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type TagUpdateResponse = TagUpdateHeaders & TagContract; /** Optional parameters. */ -export interface TagDeleteOptionalParams extends coreClient.OperationOptions {} +export interface TagDeleteOptionalParams extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TagListByOperationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperationNext operation. */ export type TagListByOperationNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type TagListByApiNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type TagListByProductNextResponse = TagCollection; /** Optional parameters. */ export interface TagListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TagListByServiceNextResponse = TagCollection; /** Optional parameters. */ export interface GraphQLApiResolverListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -7890,105 +7890,105 @@ export type GraphQLApiResolverListByApiResponse = ResolverCollection; /** Optional parameters. */ export interface GraphQLApiResolverGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GraphQLApiResolverGetEntityTagResponse = GraphQLApiResolverGetEntityTagHeaders; /** Optional parameters. */ export interface GraphQLApiResolverGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GraphQLApiResolverGetResponse = GraphQLApiResolverGetHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GraphQLApiResolverCreateOrUpdateResponse = GraphQLApiResolverCreateOrUpdateHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GraphQLApiResolverUpdateResponse = GraphQLApiResolverUpdateHeaders & - ResolverContract; + ResolverContract; /** Optional parameters. */ export interface GraphQLApiResolverDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GraphQLApiResolverListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type GraphQLApiResolverListByApiNextResponse = ResolverCollection; /** Optional parameters. */ export interface GraphQLApiResolverPolicyListByResolverOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResolver operation. */ export type GraphQLApiResolverPolicyListByResolverResponse = PolicyCollection; /** Optional parameters. */ export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GraphQLApiResolverPolicyGetEntityTagResponse = GraphQLApiResolverPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface GraphQLApiResolverPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ export type GraphQLApiResolverPolicyGetResponse = GraphQLApiResolverPolicyGetHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GraphQLApiResolverPolicyCreateOrUpdateResponse = GraphQLApiResolverPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface GraphQLApiResolverPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GraphQLApiResolverPolicyListByResolverNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResolverNext operation. */ export type GraphQLApiResolverPolicyListByResolverNextResponse = PolicyCollection; /** Optional parameters. */ export interface ApiProductListByApisOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApis operation. */ @@ -7996,30 +7996,30 @@ export type ApiProductListByApisResponse = ProductCollection; /** Optional parameters. */ export interface ApiProductListByApisNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApisNext operation. */ export type ApiProductListByApisNextResponse = ProductCollection; /** Optional parameters. */ export interface ApiPolicyListByApiOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApi operation. */ export type ApiPolicyListByApiResponse = PolicyCollection; /** Optional parameters. */ export interface ApiPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiPolicyGetEntityTagResponse = ApiPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ApiPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -8027,28 +8027,28 @@ export type ApiPolicyGetResponse = ApiPolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface ApiPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiPolicyCreateOrUpdateResponse = ApiPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ApiPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiSchemaListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByApi operation. */ @@ -8056,56 +8056,56 @@ export type ApiSchemaListByApiResponse = SchemaCollection; /** Optional parameters. */ export interface ApiSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiSchemaGetEntityTagResponse = ApiSchemaGetEntityTagHeaders; /** Optional parameters. */ export interface ApiSchemaGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiSchemaGetResponse = ApiSchemaGetHeaders & SchemaContract; /** Optional parameters. */ export interface ApiSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** 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; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** 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 ApiSchemaCreateOrUpdateResponse = ApiSchemaCreateOrUpdateHeaders & - SchemaContract; + SchemaContract; /** Optional parameters. */ export interface ApiSchemaDeleteOptionalParams - extends coreClient.OperationOptions { - /** If true removes all references to the schema before deleting it. */ - force?: boolean; + extends coreClient.OperationOptions { + /** If true removes all references to the schema before deleting it. */ + force?: boolean; } /** Optional parameters. */ export interface ApiSchemaListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ApiSchemaListByApiNextResponse = SchemaCollection; /** Optional parameters. */ export interface ApiDiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8113,60 +8113,60 @@ export type ApiDiagnosticListByServiceResponse = DiagnosticCollection; /** Optional parameters. */ export interface ApiDiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiDiagnosticGetEntityTagResponse = ApiDiagnosticGetEntityTagHeaders; /** Optional parameters. */ export interface ApiDiagnosticGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiDiagnosticGetResponse = ApiDiagnosticGetHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiDiagnosticCreateOrUpdateResponse = ApiDiagnosticCreateOrUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiDiagnosticUpdateResponse = ApiDiagnosticUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface ApiDiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiDiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiDiagnosticListByServiceNextResponse = DiagnosticCollection; /** Optional parameters. */ export interface ApiIssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; } /** Contains response data for the listByService operation. */ @@ -8174,15 +8174,15 @@ export type ApiIssueListByServiceResponse = IssueCollection; /** Optional parameters. */ export interface ApiIssueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueGetEntityTagResponse = ApiIssueGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueGetOptionalParams extends coreClient.OperationOptions { - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; } /** Contains response data for the get operation. */ @@ -8190,42 +8190,42 @@ export type ApiIssueGetResponse = ApiIssueGetHeaders & IssueContract; /** Optional parameters. */ export interface ApiIssueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueCreateOrUpdateResponse = ApiIssueCreateOrUpdateHeaders & - IssueContract; + IssueContract; /** Optional parameters. */ export interface ApiIssueUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiIssueUpdateResponse = ApiIssueUpdateHeaders & IssueContract; /** Optional parameters. */ export interface ApiIssueDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueListByServiceNextResponse = IssueCollection; /** Optional parameters. */ export interface ApiIssueCommentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8233,50 +8233,50 @@ export type ApiIssueCommentListByServiceResponse = IssueCommentCollection; /** Optional parameters. */ export interface ApiIssueCommentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueCommentGetEntityTagResponse = ApiIssueCommentGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueCommentGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiIssueCommentGetResponse = ApiIssueCommentGetHeaders & - IssueCommentContract; + IssueCommentContract; /** Optional parameters. */ export interface ApiIssueCommentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueCommentCreateOrUpdateResponse = ApiIssueCommentCreateOrUpdateHeaders & - IssueCommentContract; + IssueCommentContract; /** Optional parameters. */ export interface ApiIssueCommentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueCommentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueCommentListByServiceNextResponse = IssueCommentCollection; /** Optional parameters. */ export interface ApiIssueAttachmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8284,50 +8284,50 @@ export type ApiIssueAttachmentListByServiceResponse = IssueAttachmentCollection; /** Optional parameters. */ export interface ApiIssueAttachmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiIssueAttachmentGetEntityTagResponse = ApiIssueAttachmentGetEntityTagHeaders; /** Optional parameters. */ export interface ApiIssueAttachmentGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiIssueAttachmentGetResponse = ApiIssueAttachmentGetHeaders & - IssueAttachmentContract; + IssueAttachmentContract; /** Optional parameters. */ export interface ApiIssueAttachmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiIssueAttachmentCreateOrUpdateResponse = ApiIssueAttachmentCreateOrUpdateHeaders & - IssueAttachmentContract; + IssueAttachmentContract; /** Optional parameters. */ export interface ApiIssueAttachmentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiIssueAttachmentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiIssueAttachmentListByServiceNextResponse = IssueAttachmentCollection; /** Optional parameters. */ export interface ApiTagDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8335,52 +8335,52 @@ export type ApiTagDescriptionListByServiceResponse = TagDescriptionCollection; /** Optional parameters. */ export interface ApiTagDescriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiTagDescriptionGetEntityTagResponse = ApiTagDescriptionGetEntityTagHeaders; /** Optional parameters. */ export interface ApiTagDescriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiTagDescriptionGetResponse = ApiTagDescriptionGetHeaders & - TagDescriptionContract; + TagDescriptionContract; /** Optional parameters. */ export interface ApiTagDescriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiTagDescriptionCreateOrUpdateResponse = ApiTagDescriptionCreateOrUpdateHeaders & - TagDescriptionContract; + TagDescriptionContract; /** Optional parameters. */ export interface ApiTagDescriptionDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiTagDescriptionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiTagDescriptionListByServiceNextResponse = TagDescriptionCollection; /** Optional parameters. */ export interface OperationListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Operations. */ - includeNotTaggedOperations?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Operations. */ + includeNotTaggedOperations?: boolean; } /** Contains response data for the listByTags operation. */ @@ -8388,55 +8388,55 @@ export type OperationListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface OperationListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type OperationListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ApiWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiWikiGetEntityTagResponse = ApiWikiGetEntityTagHeaders; /** Optional parameters. */ -export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions {} +export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiWikiGetResponse = ApiWikiGetHeaders & WikiContract; /** Optional parameters. */ export interface ApiWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiWikiCreateOrUpdateResponse = ApiWikiCreateOrUpdateHeaders & - WikiContract; + WikiContract; /** Optional parameters. */ export interface ApiWikiUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiWikiUpdateResponse = ApiWikiUpdateHeaders & WikiContract; /** Optional parameters. */ export interface ApiWikiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -8444,27 +8444,27 @@ export type ApiWikisListResponse = WikiCollection; /** Optional parameters. */ export interface ApiWikisListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiWikisListNextResponse = WikiCollection; /** Optional parameters. */ export interface ApiExportGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiExportGetResponse = ApiExportResult; /** Optional parameters. */ export interface ApiVersionSetListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8472,58 +8472,58 @@ export type ApiVersionSetListByServiceResponse = ApiVersionSetCollection; /** Optional parameters. */ export interface ApiVersionSetGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ApiVersionSetGetEntityTagResponse = ApiVersionSetGetEntityTagHeaders; /** Optional parameters. */ export interface ApiVersionSetGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiVersionSetGetResponse = ApiVersionSetGetHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ApiVersionSetCreateOrUpdateResponse = ApiVersionSetCreateOrUpdateHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ApiVersionSetUpdateResponse = ApiVersionSetUpdateHeaders & - ApiVersionSetContract; + ApiVersionSetContract; /** Optional parameters. */ export interface ApiVersionSetDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ApiVersionSetListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ApiVersionSetListByServiceNextResponse = ApiVersionSetCollection; /** Optional parameters. */ export interface AuthorizationServerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8531,66 +8531,66 @@ export type AuthorizationServerListByServiceResponse = AuthorizationServerCollec /** Optional parameters. */ export interface AuthorizationServerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type AuthorizationServerGetEntityTagResponse = AuthorizationServerGetEntityTagHeaders; /** Optional parameters. */ export interface AuthorizationServerGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationServerGetResponse = AuthorizationServerGetHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationServerCreateOrUpdateResponse = AuthorizationServerCreateOrUpdateHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type AuthorizationServerUpdateResponse = AuthorizationServerUpdateHeaders & - AuthorizationServerContract; + AuthorizationServerContract; /** Optional parameters. */ export interface AuthorizationServerDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationServerListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type AuthorizationServerListSecretsResponse = AuthorizationServerListSecretsHeaders & - AuthorizationServerSecretsContract; + AuthorizationServerSecretsContract; /** Optional parameters. */ export interface AuthorizationServerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type AuthorizationServerListByServiceNextResponse = AuthorizationServerCollection; /** Optional parameters. */ export interface AuthorizationProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8598,43 +8598,43 @@ export type AuthorizationProviderListByServiceResponse = AuthorizationProviderCo /** Optional parameters. */ export interface AuthorizationProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationProviderGetResponse = AuthorizationProviderGetHeaders & - AuthorizationProviderContract; + AuthorizationProviderContract; /** Optional parameters. */ export interface AuthorizationProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationProviderCreateOrUpdateResponse = AuthorizationProviderCreateOrUpdateHeaders & - AuthorizationProviderContract; + AuthorizationProviderContract; /** Optional parameters. */ export interface AuthorizationProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type AuthorizationProviderListByServiceNextResponse = AuthorizationProviderCollection; /** Optional parameters. */ export interface AuthorizationListByAuthorizationProviderOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByAuthorizationProvider operation. */ @@ -8642,58 +8642,58 @@ export type AuthorizationListByAuthorizationProviderResponse = AuthorizationColl /** Optional parameters. */ export interface AuthorizationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationGetResponse = AuthorizationGetHeaders & - AuthorizationContract; + AuthorizationContract; /** Optional parameters. */ export interface AuthorizationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationCreateOrUpdateResponse = AuthorizationCreateOrUpdateHeaders & - AuthorizationContract; + AuthorizationContract; /** Optional parameters. */ export interface AuthorizationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationConfirmConsentCodeOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the confirmConsentCode operation. */ export type AuthorizationConfirmConsentCodeResponse = AuthorizationConfirmConsentCodeHeaders; /** Optional parameters. */ export interface AuthorizationListByAuthorizationProviderNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByAuthorizationProviderNext operation. */ export type AuthorizationListByAuthorizationProviderNextResponse = AuthorizationCollection; /** Optional parameters. */ export interface AuthorizationLoginLinksPostOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the post operation. */ export type AuthorizationLoginLinksPostResponse = AuthorizationLoginLinksPostHeaders & - AuthorizationLoginResponseContract; + AuthorizationLoginResponseContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByAuthorization operation. */ @@ -8701,43 +8701,43 @@ export type AuthorizationAccessPolicyListByAuthorizationResponse = Authorization /** Optional parameters. */ export interface AuthorizationAccessPolicyGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type AuthorizationAccessPolicyGetResponse = AuthorizationAccessPolicyGetHeaders & - AuthorizationAccessPolicyContract; + AuthorizationAccessPolicyContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type AuthorizationAccessPolicyCreateOrUpdateResponse = AuthorizationAccessPolicyCreateOrUpdateHeaders & - AuthorizationAccessPolicyContract; + AuthorizationAccessPolicyContract; /** Optional parameters. */ export interface AuthorizationAccessPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface AuthorizationAccessPolicyListByAuthorizationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByAuthorizationNext operation. */ export type AuthorizationAccessPolicyListByAuthorizationNextResponse = AuthorizationAccessPolicyCollection; /** Optional parameters. */ export interface BackendListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8745,60 +8745,60 @@ export type BackendListByServiceResponse = BackendCollection; /** Optional parameters. */ export interface BackendGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type BackendGetEntityTagResponse = BackendGetEntityTagHeaders; /** Optional parameters. */ -export interface BackendGetOptionalParams extends coreClient.OperationOptions {} +export interface BackendGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type BackendGetResponse = BackendGetHeaders & BackendContract; /** Optional parameters. */ export interface BackendCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type BackendCreateOrUpdateResponse = BackendCreateOrUpdateHeaders & - BackendContract; + BackendContract; /** Optional parameters. */ export interface BackendUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type BackendUpdateResponse = BackendUpdateHeaders & BackendContract; /** Optional parameters. */ export interface BackendDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface BackendReconnectOptionalParams - extends coreClient.OperationOptions { - /** Reconnect request parameters. */ - parameters?: BackendReconnectContract; + extends coreClient.OperationOptions { + /** Reconnect request parameters. */ + parameters?: BackendReconnectContract; } /** Optional parameters. */ export interface BackendListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type BackendListByServiceNextResponse = BackendCollection; /** Optional parameters. */ export interface CacheListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -8806,57 +8806,57 @@ export type CacheListByServiceResponse = CacheCollection; /** Optional parameters. */ export interface CacheGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type CacheGetEntityTagResponse = CacheGetEntityTagHeaders; /** Optional parameters. */ -export interface CacheGetOptionalParams extends coreClient.OperationOptions {} +export interface CacheGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type CacheGetResponse = CacheGetHeaders & CacheContract; /** Optional parameters. */ export interface CacheCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type CacheCreateOrUpdateResponse = CacheCreateOrUpdateHeaders & - CacheContract; + CacheContract; /** Optional parameters. */ export interface CacheUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type CacheUpdateResponse = CacheUpdateHeaders & CacheContract; /** Optional parameters. */ export interface CacheDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface CacheListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type CacheListByServiceNextResponse = CacheCollection; /** Optional parameters. */ export interface CertificateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only certificates entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only certificates entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; } /** Contains response data for the listByService operation. */ @@ -8864,56 +8864,56 @@ export type CertificateListByServiceResponse = CertificateCollection; /** Optional parameters. */ export interface CertificateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type CertificateGetEntityTagResponse = CertificateGetEntityTagHeaders; /** Optional parameters. */ export interface CertificateGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type CertificateGetResponse = CertificateGetHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type CertificateCreateOrUpdateResponse = CertificateCreateOrUpdateHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface CertificateRefreshSecretOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the refreshSecret operation. */ export type CertificateRefreshSecretResponse = CertificateRefreshSecretHeaders & - CertificateContract; + CertificateContract; /** Optional parameters. */ export interface CertificateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type CertificateListByServiceNextResponse = CertificateCollection; /** Optional parameters. */ export interface PerformConnectivityCheckAsyncOptionalParams - 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; + 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 performConnectivityCheckAsync operation. */ @@ -8921,150 +8921,150 @@ export type PerformConnectivityCheckAsyncResponse = ConnectivityCheckResponse; /** Optional parameters. */ export interface ContentTypeListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type ContentTypeListByServiceResponse = ContentTypeCollection; /** Optional parameters. */ export interface ContentTypeGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ContentTypeGetResponse = ContentTypeGetHeaders & - ContentTypeContract; + ContentTypeContract; /** Optional parameters. */ export interface ContentTypeCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ContentTypeCreateOrUpdateResponse = ContentTypeCreateOrUpdateHeaders & - ContentTypeContract; + ContentTypeContract; /** Optional parameters. */ export interface ContentTypeDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ContentTypeListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ContentTypeListByServiceNextResponse = ContentTypeCollection; /** Optional parameters. */ export interface ContentItemListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type ContentItemListByServiceResponse = ContentItemCollection; /** Optional parameters. */ export interface ContentItemGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ContentItemGetEntityTagResponse = ContentItemGetEntityTagHeaders; /** Optional parameters. */ export interface ContentItemGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ContentItemGetResponse = ContentItemGetHeaders & - ContentItemContract; + ContentItemContract; /** Optional parameters. */ export interface ContentItemCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ContentItemCreateOrUpdateResponse = ContentItemCreateOrUpdateHeaders & - ContentItemContract; + ContentItemContract; /** Optional parameters. */ export interface ContentItemDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ContentItemListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ContentItemListByServiceNextResponse = ContentItemCollection; /** Optional parameters. */ export interface DeletedServicesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscription operation. */ export type DeletedServicesListBySubscriptionResponse = DeletedServicesCollection; /** Optional parameters. */ export interface DeletedServicesGetByNameOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByName operation. */ export type DeletedServicesGetByNameResponse = DeletedServiceContract; /** Optional parameters. */ export interface DeletedServicesPurgeOptionalParams - 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; + 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 DeletedServicesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscriptionNext operation. */ export type DeletedServicesListBySubscriptionNextResponse = DeletedServicesCollection; /** Optional parameters. */ export interface ApiManagementOperationsListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementOperationsListResponse = OperationListResult; /** Optional parameters. */ export interface ApiManagementOperationsListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementOperationsListNextResponse = OperationListResult; /** Optional parameters. */ export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listAvailableServiceSkus operation. */ export type ApiManagementServiceSkusListAvailableServiceSkusResponse = ResourceSkuResults; /** Optional parameters. */ export interface ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listAvailableServiceSkusNext operation. */ export type ApiManagementServiceSkusListAvailableServiceSkusNextResponse = ResourceSkuResults; /** Optional parameters. */ export interface ApiManagementServiceRestoreOptionalParams - 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; + 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 restore operation. */ @@ -9072,11 +9072,11 @@ export type ApiManagementServiceRestoreResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceBackupOptionalParams - 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; + 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 backup operation. */ @@ -9084,11 +9084,11 @@ export type ApiManagementServiceBackupResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceCreateOrUpdateOptionalParams - 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; + 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. */ @@ -9096,11 +9096,11 @@ export type ApiManagementServiceCreateOrUpdateResponse = ApiManagementServiceRes /** Optional parameters. */ export interface ApiManagementServiceUpdateOptionalParams - 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; + 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 update operation. */ @@ -9108,27 +9108,27 @@ export type ApiManagementServiceUpdateResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ApiManagementServiceGetResponse = ApiManagementServiceResource; /** Optional parameters. */ export interface ApiManagementServiceDeleteOptionalParams - 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; + 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 ApiManagementServiceMigrateToStv2OptionalParams - 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; + 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 migrateToStv2 operation. */ @@ -9136,48 +9136,48 @@ export type ApiManagementServiceMigrateToStv2Response = ApiManagementServiceReso /** Optional parameters. */ export interface ApiManagementServiceListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResourceGroup operation. */ export type ApiManagementServiceListByResourceGroupResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementServiceListResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceGetSsoTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSsoToken operation. */ export type ApiManagementServiceGetSsoTokenResponse = ApiManagementServiceGetSsoTokenResult; /** Optional parameters. */ export interface ApiManagementServiceCheckNameAvailabilityOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkNameAvailability operation. */ export type ApiManagementServiceCheckNameAvailabilityResponse = ApiManagementServiceNameAvailabilityResult; /** Optional parameters. */ export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getDomainOwnershipIdentifier operation. */ export type ApiManagementServiceGetDomainOwnershipIdentifierResponse = ApiManagementServiceGetDomainOwnershipIdentifierResult; /** Optional parameters. */ export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - extends coreClient.OperationOptions { - /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ - parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; - /** 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; + extends coreClient.OperationOptions { + /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ + parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; + /** 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 applyNetworkConfigurationUpdates operation. */ @@ -9185,27 +9185,27 @@ export type ApiManagementServiceApplyNetworkConfigurationUpdatesResponse = ApiMa /** Optional parameters. */ export interface ApiManagementServiceListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByResourceGroupNext operation. */ export type ApiManagementServiceListByResourceGroupNextResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface ApiManagementServiceListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementServiceListNextResponse = ApiManagementServiceListResult; /** Optional parameters. */ export interface DiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9213,57 +9213,57 @@ export type DiagnosticListByServiceResponse = DiagnosticCollection; /** Optional parameters. */ export interface DiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DiagnosticGetEntityTagResponse = DiagnosticGetEntityTagHeaders; /** Optional parameters. */ export interface DiagnosticGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DiagnosticGetResponse = DiagnosticGetHeaders & DiagnosticContract; /** Optional parameters. */ export interface DiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type DiagnosticCreateOrUpdateResponse = DiagnosticCreateOrUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface DiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type DiagnosticUpdateResponse = DiagnosticUpdateHeaders & - DiagnosticContract; + DiagnosticContract; /** Optional parameters. */ export interface DiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type DiagnosticListByServiceNextResponse = DiagnosticCollection; /** Optional parameters. */ export interface EmailTemplateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9271,24 +9271,24 @@ export type EmailTemplateListByServiceResponse = EmailTemplateCollection; /** Optional parameters. */ export interface EmailTemplateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type EmailTemplateGetEntityTagResponse = EmailTemplateGetEntityTagHeaders; /** Optional parameters. */ export interface EmailTemplateGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type EmailTemplateGetResponse = EmailTemplateGetHeaders & - EmailTemplateContract; + EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -9296,32 +9296,32 @@ export type EmailTemplateCreateOrUpdateResponse = EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type EmailTemplateUpdateResponse = EmailTemplateUpdateHeaders & - EmailTemplateContract; + EmailTemplateContract; /** Optional parameters. */ export interface EmailTemplateDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface EmailTemplateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type EmailTemplateListByServiceNextResponse = EmailTemplateCollection; /** Optional parameters. */ export interface GatewayListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9329,74 +9329,74 @@ export type GatewayListByServiceResponse = GatewayCollection; /** Optional parameters. */ export interface GatewayGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayGetEntityTagResponse = GatewayGetEntityTagHeaders; /** Optional parameters. */ -export interface GatewayGetOptionalParams extends coreClient.OperationOptions {} +export interface GatewayGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayGetResponse = GatewayGetHeaders & GatewayContract; /** Optional parameters. */ export interface GatewayCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayCreateOrUpdateResponse = GatewayCreateOrUpdateHeaders & - GatewayContract; + GatewayContract; /** Optional parameters. */ export interface GatewayUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GatewayUpdateResponse = GatewayUpdateHeaders & GatewayContract; /** Optional parameters. */ export interface GatewayDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayListKeysOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listKeys operation. */ export type GatewayListKeysResponse = GatewayListKeysHeaders & - GatewayKeysContract; + GatewayKeysContract; /** Optional parameters. */ export interface GatewayRegenerateKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayGenerateTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the generateToken operation. */ export type GatewayGenerateTokenResponse = GatewayTokenContract; /** Optional parameters. */ export interface GatewayListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayListByServiceNextResponse = GatewayCollection; /** Optional parameters. */ export interface GatewayHostnameConfigurationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9404,50 +9404,50 @@ export type GatewayHostnameConfigurationListByServiceResponse = GatewayHostnameC /** Optional parameters. */ export interface GatewayHostnameConfigurationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayHostnameConfigurationGetEntityTagResponse = GatewayHostnameConfigurationGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayHostnameConfigurationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayHostnameConfigurationGetResponse = GatewayHostnameConfigurationGetHeaders & - GatewayHostnameConfigurationContract; + GatewayHostnameConfigurationContract; /** Optional parameters. */ export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayHostnameConfigurationCreateOrUpdateResponse = GatewayHostnameConfigurationCreateOrUpdateHeaders & - GatewayHostnameConfigurationContract; + GatewayHostnameConfigurationContract; /** Optional parameters. */ export interface GatewayHostnameConfigurationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayHostnameConfigurationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayHostnameConfigurationListByServiceNextResponse = GatewayHostnameConfigurationCollection; /** Optional parameters. */ export interface GatewayApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9455,16 +9455,16 @@ export type GatewayApiListByServiceResponse = ApiCollection; /** Optional parameters. */ export interface GatewayApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayApiGetEntityTagResponse = GatewayApiGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Association entity details. */ - parameters?: AssociationContract; + extends coreClient.OperationOptions { + /** Association entity details. */ + parameters?: AssociationContract; } /** Contains response data for the createOrUpdate operation. */ @@ -9472,24 +9472,24 @@ export type GatewayApiCreateOrUpdateResponse = ApiContract; /** Optional parameters. */ export interface GatewayApiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayApiListByServiceNextResponse = ApiCollection; /** Optional parameters. */ export interface GatewayCertificateAuthorityListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9497,50 +9497,50 @@ export type GatewayCertificateAuthorityListByServiceResponse = GatewayCertificat /** Optional parameters. */ export interface GatewayCertificateAuthorityGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GatewayCertificateAuthorityGetEntityTagResponse = GatewayCertificateAuthorityGetEntityTagHeaders; /** Optional parameters. */ export interface GatewayCertificateAuthorityGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GatewayCertificateAuthorityGetResponse = GatewayCertificateAuthorityGetHeaders & - GatewayCertificateAuthorityContract; + GatewayCertificateAuthorityContract; /** Optional parameters. */ export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GatewayCertificateAuthorityCreateOrUpdateResponse = GatewayCertificateAuthorityCreateOrUpdateHeaders & - GatewayCertificateAuthorityContract; + GatewayCertificateAuthorityContract; /** Optional parameters. */ export interface GatewayCertificateAuthorityDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GatewayCertificateAuthorityListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GatewayCertificateAuthorityListByServiceNextResponse = GatewayCertificateAuthorityCollection; /** Optional parameters. */ export interface GroupListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9548,55 +9548,55 @@ export type GroupListByServiceResponse = GroupCollection; /** Optional parameters. */ export interface GroupGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GroupGetEntityTagResponse = GroupGetEntityTagHeaders; /** Optional parameters. */ -export interface GroupGetOptionalParams extends coreClient.OperationOptions {} +export interface GroupGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GroupGetResponse = GroupGetHeaders & GroupContract; /** Optional parameters. */ export interface GroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type GroupCreateOrUpdateResponse = GroupCreateOrUpdateHeaders & - GroupContract; + GroupContract; /** Optional parameters. */ export interface GroupUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type GroupUpdateResponse = GroupUpdateHeaders & GroupContract; /** Optional parameters. */ export interface GroupDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GroupListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GroupListByServiceNextResponse = GroupCollection; /** Optional parameters. */ export interface GroupUserListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -9604,127 +9604,127 @@ export type GroupUserListResponse = UserCollection; /** Optional parameters. */ export interface GroupUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type GroupUserCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface GroupUserCreateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the create operation. */ export type GroupUserCreateResponse = UserContract; /** Optional parameters. */ export interface GroupUserDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GroupUserListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type GroupUserListNextResponse = UserCollection; /** Optional parameters. */ export interface IdentityProviderListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type IdentityProviderListByServiceResponse = IdentityProviderList; /** Optional parameters. */ export interface IdentityProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type IdentityProviderGetEntityTagResponse = IdentityProviderGetEntityTagHeaders; /** Optional parameters. */ export interface IdentityProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type IdentityProviderGetResponse = IdentityProviderGetHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type IdentityProviderCreateOrUpdateResponse = IdentityProviderCreateOrUpdateHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type IdentityProviderUpdateResponse = IdentityProviderUpdateHeaders & - IdentityProviderContract; + IdentityProviderContract; /** Optional parameters. */ export interface IdentityProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface IdentityProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type IdentityProviderListSecretsResponse = IdentityProviderListSecretsHeaders & - ClientSecretContract; + ClientSecretContract; /** Optional parameters. */ export interface IdentityProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type IdentityProviderListByServiceNextResponse = IdentityProviderList; /** Optional parameters. */ export interface IssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ export type IssueListByServiceResponse = IssueCollection; /** Optional parameters. */ -export interface IssueGetOptionalParams extends coreClient.OperationOptions {} +export interface IssueGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type IssueGetResponse = IssueGetHeaders & IssueContract; /** Optional parameters. */ export interface IssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type IssueListByServiceNextResponse = IssueCollection; /** Optional parameters. */ export interface LoggerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9732,57 +9732,57 @@ export type LoggerListByServiceResponse = LoggerCollection; /** Optional parameters. */ export interface LoggerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type LoggerGetEntityTagResponse = LoggerGetEntityTagHeaders; /** Optional parameters. */ -export interface LoggerGetOptionalParams extends coreClient.OperationOptions {} +export interface LoggerGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type LoggerGetResponse = LoggerGetHeaders & LoggerContract; /** Optional parameters. */ export interface LoggerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type LoggerCreateOrUpdateResponse = LoggerCreateOrUpdateHeaders & - LoggerContract; + LoggerContract; /** Optional parameters. */ export interface LoggerUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type LoggerUpdateResponse = LoggerUpdateHeaders & LoggerContract; /** Optional parameters. */ export interface LoggerDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface LoggerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type LoggerListByServiceNextResponse = LoggerCollection; /** Optional parameters. */ export interface NamedValueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only named value entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only named value entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; } /** Contains response data for the listByService operation. */ @@ -9790,99 +9790,99 @@ export type NamedValueListByServiceResponse = NamedValueCollection; /** Optional parameters. */ export interface NamedValueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type NamedValueGetEntityTagResponse = NamedValueGetEntityTagHeaders; /** Optional parameters. */ export interface NamedValueGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type NamedValueGetResponse = NamedValueGetHeaders & NamedValueContract; /** Optional parameters. */ export interface NamedValueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** 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; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** 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 NamedValueCreateOrUpdateResponse = NamedValueCreateOrUpdateHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueUpdateOptionalParams - 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; + 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 update operation. */ export type NamedValueUpdateResponse = NamedValueUpdateHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface NamedValueListValueOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listValue operation. */ export type NamedValueListValueResponse = NamedValueListValueHeaders & - NamedValueSecretContract; + NamedValueSecretContract; /** Optional parameters. */ export interface NamedValueRefreshSecretOptionalParams - 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; + 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 refreshSecret operation. */ export type NamedValueRefreshSecretResponse = NamedValueRefreshSecretHeaders & - NamedValueContract; + NamedValueContract; /** Optional parameters. */ export interface NamedValueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type NamedValueListByServiceNextResponse = NamedValueCollection; /** Optional parameters. */ export interface NetworkStatusListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type NetworkStatusListByServiceResponse = NetworkStatusContractByLocation[]; /** Optional parameters. */ export interface NetworkStatusListByLocationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByLocation operation. */ export type NetworkStatusListByLocationResponse = NetworkStatusContract; /** Optional parameters. */ export interface NotificationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9890,16 +9890,16 @@ export type NotificationListByServiceResponse = NotificationCollection; /** Optional parameters. */ export interface NotificationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type NotificationGetResponse = NotificationContract; /** Optional parameters. */ export interface NotificationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -9907,74 +9907,74 @@ export type NotificationCreateOrUpdateResponse = NotificationContract; /** Optional parameters. */ export interface NotificationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type NotificationListByServiceNextResponse = NotificationCollection; /** Optional parameters. */ export interface NotificationRecipientUserListByNotificationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByNotification operation. */ export type NotificationRecipientUserListByNotificationResponse = RecipientUserCollection; /** Optional parameters. */ export interface NotificationRecipientUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type NotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface NotificationRecipientUserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type NotificationRecipientUserCreateOrUpdateResponse = RecipientUserContract; /** Optional parameters. */ export interface NotificationRecipientUserDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface NotificationRecipientEmailListByNotificationOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByNotification operation. */ export type NotificationRecipientEmailListByNotificationResponse = RecipientEmailCollection; /** Optional parameters. */ export interface NotificationRecipientEmailCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type NotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface NotificationRecipientEmailCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type NotificationRecipientEmailCreateOrUpdateResponse = RecipientEmailContract; /** Optional parameters. */ export interface NotificationRecipientEmailDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface OpenIdConnectProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -9982,82 +9982,82 @@ export type OpenIdConnectProviderListByServiceResponse = OpenIdConnectProviderCo /** Optional parameters. */ export interface OpenIdConnectProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type OpenIdConnectProviderGetEntityTagResponse = OpenIdConnectProviderGetEntityTagHeaders; /** Optional parameters. */ export interface OpenIdConnectProviderGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type OpenIdConnectProviderGetResponse = OpenIdConnectProviderGetHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type OpenIdConnectProviderCreateOrUpdateResponse = OpenIdConnectProviderCreateOrUpdateHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type OpenIdConnectProviderUpdateResponse = OpenIdConnectProviderUpdateHeaders & - OpenidConnectProviderContract; + OpenidConnectProviderContract; /** Optional parameters. */ export interface OpenIdConnectProviderDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface OpenIdConnectProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type OpenIdConnectProviderListSecretsResponse = OpenIdConnectProviderListSecretsHeaders & - ClientSecretContract; + ClientSecretContract; /** Optional parameters. */ export interface OpenIdConnectProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type OpenIdConnectProviderListByServiceNextResponse = OpenIdConnectProviderCollection; /** Optional parameters. */ export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type OutboundNetworkDependenciesEndpointsListByServiceResponse = OutboundEnvironmentEndpointList; /** Optional parameters. */ export interface PolicyListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PolicyListByServiceResponse = PolicyCollection; /** Optional parameters. */ export interface PolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PolicyGetEntityTagResponse = PolicyGetEntityTagHeaders; /** Optional parameters. */ export interface PolicyGetOptionalParams extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -10065,24 +10065,24 @@ export type PolicyGetResponse = PolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface PolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type PolicyCreateOrUpdateResponse = PolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface PolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface PolicyDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Policy scope. */ - scope?: PolicyScopeContract; + extends coreClient.OperationOptions { + /** Policy scope. */ + scope?: PolicyScopeContract; } /** Contains response data for the listByService operation. */ @@ -10090,15 +10090,15 @@ export type PolicyDescriptionListByServiceResponse = PolicyDescriptionCollection /** Optional parameters. */ export interface PolicyFragmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByService operation. */ @@ -10106,48 +10106,48 @@ export type PolicyFragmentListByServiceResponse = PolicyFragmentCollection; /** Optional parameters. */ export interface PolicyFragmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PolicyFragmentGetEntityTagResponse = PolicyFragmentGetEntityTagHeaders; /** Optional parameters. */ export interface PolicyFragmentGetOptionalParams - extends coreClient.OperationOptions { - /** Policy fragment content format. */ - format?: PolicyFragmentContentFormat; + extends coreClient.OperationOptions { + /** Policy fragment content format. */ + format?: PolicyFragmentContentFormat; } /** Contains response data for the get operation. */ export type PolicyFragmentGetResponse = PolicyFragmentGetHeaders & - PolicyFragmentContract; + PolicyFragmentContract; /** Optional parameters. */ export interface PolicyFragmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** 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; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** 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 PolicyFragmentCreateOrUpdateResponse = PolicyFragmentCreateOrUpdateHeaders & - PolicyFragmentContract; + PolicyFragmentContract; /** Optional parameters. */ export interface PolicyFragmentDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface PolicyFragmentListReferencesOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listReferences operation. */ @@ -10155,57 +10155,57 @@ export type PolicyFragmentListReferencesResponse = ResourceCollection; /** Optional parameters. */ export interface PortalConfigListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PortalConfigListByServiceResponse = PortalConfigCollection; /** Optional parameters. */ export interface PortalConfigGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PortalConfigGetEntityTagResponse = PortalConfigGetEntityTagHeaders; /** Optional parameters. */ export interface PortalConfigGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type PortalConfigGetResponse = PortalConfigGetHeaders & - PortalConfigContract; + PortalConfigContract; /** Optional parameters. */ export interface PortalConfigUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type PortalConfigUpdateResponse = PortalConfigContract; /** Optional parameters. */ export interface PortalConfigCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type PortalConfigCreateOrUpdateResponse = PortalConfigContract; /** Optional parameters. */ export interface PortalRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** - * | Field | Supported operators | Supported functions | - * |-------------|------------------------|-----------------------------------| - * - * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |isCurrent | eq, ne | | - * - */ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** + * | Field | Supported operators | Supported functions | + * |-------------|------------------------|-----------------------------------| + * + * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |isCurrent | eq, ne | | + * + */ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -10213,83 +10213,83 @@ export type PortalRevisionListByServiceResponse = PortalRevisionCollection; /** Optional parameters. */ export interface PortalRevisionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type PortalRevisionGetEntityTagResponse = PortalRevisionGetEntityTagHeaders; /** Optional parameters. */ export interface PortalRevisionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type PortalRevisionGetResponse = PortalRevisionGetHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionCreateOrUpdateOptionalParams - 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; + 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 PortalRevisionCreateOrUpdateResponse = PortalRevisionCreateOrUpdateHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionUpdateOptionalParams - 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; + 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 update operation. */ export type PortalRevisionUpdateResponse = PortalRevisionUpdateHeaders & - PortalRevisionContract; + PortalRevisionContract; /** Optional parameters. */ export interface PortalRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type PortalRevisionListByServiceNextResponse = PortalRevisionCollection; /** Optional parameters. */ export interface PortalSettingsListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PortalSettingsListByServiceResponse = PortalSettingsCollection; /** Optional parameters. */ export interface SignInSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SignInSettingsGetEntityTagResponse = SignInSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface SignInSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SignInSettingsGetResponse = SignInSettingsGetHeaders & - PortalSigninSettings; + PortalSigninSettings; /** Optional parameters. */ export interface SignInSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SignInSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10297,28 +10297,28 @@ export type SignInSettingsCreateOrUpdateResponse = PortalSigninSettings; /** Optional parameters. */ export interface SignUpSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SignUpSettingsGetEntityTagResponse = SignUpSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface SignUpSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SignUpSettingsGetResponse = SignUpSettingsGetHeaders & - PortalSignupSettings; + PortalSignupSettings; /** Optional parameters. */ export interface SignUpSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SignUpSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10326,28 +10326,28 @@ export type SignUpSettingsCreateOrUpdateResponse = PortalSignupSettings; /** Optional parameters. */ export interface DelegationSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DelegationSettingsGetEntityTagResponse = DelegationSettingsGetEntityTagHeaders; /** Optional parameters. */ export interface DelegationSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DelegationSettingsGetResponse = DelegationSettingsGetHeaders & - PortalDelegationSettings; + PortalDelegationSettings; /** Optional parameters. */ export interface DelegationSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DelegationSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -10355,32 +10355,32 @@ export type DelegationSettingsCreateOrUpdateResponse = PortalDelegationSettings; /** Optional parameters. */ export interface DelegationSettingsListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type DelegationSettingsListSecretsResponse = PortalSettingValidationKeyContract; /** Optional parameters. */ export interface PrivateEndpointConnectionListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type PrivateEndpointConnectionListByServiceResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionGetByNameOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getByName operation. */ export type PrivateEndpointConnectionGetByNameResponse = PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams - 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; + 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. */ @@ -10388,40 +10388,40 @@ export type PrivateEndpointConnectionCreateOrUpdateResponse = PrivateEndpointCon /** Optional parameters. */ export interface PrivateEndpointConnectionDeleteOptionalParams - 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; + 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 PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listPrivateLinkResources operation. */ export type PrivateEndpointConnectionListPrivateLinkResourcesResponse = PrivateLinkResourceListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getPrivateLinkResource operation. */ export type PrivateEndpointConnectionGetPrivateLinkResourceResponse = PrivateLinkResource; /** Optional parameters. */ export interface ProductListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Products which are part of a specific tag. */ - tags?: string; - /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ - expandGroups?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Products which are part of a specific tag. */ + tags?: string; + /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ + expandGroups?: boolean; } /** Contains response data for the listByService operation. */ @@ -10429,53 +10429,53 @@ export type ProductListByServiceResponse = ProductCollection; /** Optional parameters. */ export interface ProductGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductGetEntityTagResponse = ProductGetEntityTagHeaders; /** Optional parameters. */ -export interface ProductGetOptionalParams extends coreClient.OperationOptions {} +export interface ProductGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ProductGetResponse = ProductGetHeaders & ProductContract; /** Optional parameters. */ export interface ProductCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductCreateOrUpdateResponse = ProductCreateOrUpdateHeaders & - ProductContract; + ProductContract; /** Optional parameters. */ export interface ProductUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ProductUpdateResponse = ProductUpdateHeaders & ProductContract; /** Optional parameters. */ export interface ProductDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete existing subscriptions associated with the product or not. */ - deleteSubscriptions?: boolean; + extends coreClient.OperationOptions { + /** Delete existing subscriptions associated with the product or not. */ + deleteSubscriptions?: boolean; } /** Optional parameters. */ export interface ProductListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Products. */ - includeNotTaggedProducts?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Products. */ + includeNotTaggedProducts?: boolean; } /** Contains response data for the listByTags operation. */ @@ -10483,27 +10483,27 @@ export type ProductListByTagsResponse = TagResourceCollection; /** Optional parameters. */ export interface ProductListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type ProductListByServiceNextResponse = ProductCollection; /** Optional parameters. */ export interface ProductListByTagsNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTagsNext operation. */ export type ProductListByTagsNextResponse = TagResourceCollection; /** Optional parameters. */ export interface ProductApiListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -10511,40 +10511,40 @@ export type ProductApiListByProductResponse = ApiCollection; /** Optional parameters. */ export interface ProductApiCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type ProductApiCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface ProductApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type ProductApiCreateOrUpdateResponse = ApiContract; /** Optional parameters. */ export interface ProductApiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductApiListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ProductApiListByProductNextResponse = ApiCollection; /** Optional parameters. */ export interface ProductGroupListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByProduct operation. */ @@ -10552,40 +10552,40 @@ export type ProductGroupListByProductResponse = GroupCollection; /** Optional parameters. */ export interface ProductGroupCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the checkEntityExists operation. */ export type ProductGroupCheckEntityExistsResponse = { - body: boolean; + body: boolean; }; /** Optional parameters. */ export interface ProductGroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the createOrUpdate operation. */ export type ProductGroupCreateOrUpdateResponse = GroupContract; /** Optional parameters. */ export interface ProductGroupDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductGroupListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ProductGroupListByProductNextResponse = GroupCollection; /** Optional parameters. */ export interface ProductSubscriptionsListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -10593,30 +10593,30 @@ export type ProductSubscriptionsListResponse = SubscriptionCollection; /** Optional parameters. */ export interface ProductSubscriptionsListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ProductSubscriptionsListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface ProductPolicyListByProductOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProduct operation. */ export type ProductPolicyListByProductResponse = PolicyCollection; /** Optional parameters. */ export interface ProductPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductPolicyGetEntityTagResponse = ProductPolicyGetEntityTagHeaders; /** Optional parameters. */ export interface ProductPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; + extends coreClient.OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; } /** Contains response data for the get operation. */ @@ -10624,64 +10624,64 @@ export type ProductPolicyGetResponse = ProductPolicyGetHeaders & PolicyContract; /** Optional parameters. */ export interface ProductPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductPolicyCreateOrUpdateResponse = ProductPolicyCreateOrUpdateHeaders & - PolicyContract; + PolicyContract; /** Optional parameters. */ export interface ProductPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type ProductWikiGetEntityTagResponse = ProductWikiGetEntityTagHeaders; /** Optional parameters. */ export interface ProductWikiGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type ProductWikiGetResponse = ProductWikiGetHeaders & WikiContract; /** Optional parameters. */ export interface ProductWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type ProductWikiCreateOrUpdateResponse = ProductWikiCreateOrUpdateHeaders & - WikiContract; + WikiContract; /** Optional parameters. */ export interface ProductWikiUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type ProductWikiUpdateResponse = ProductWikiUpdateHeaders & WikiContract; /** Optional parameters. */ export interface ProductWikiDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface ProductWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -10689,63 +10689,63 @@ export type ProductWikisListResponse = ProductWikisListHeaders & WikiCollection; /** Optional parameters. */ export interface ProductWikisListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ProductWikisListNextResponse = ProductWikisListNextHeaders & - WikiCollection; + WikiCollection; /** Optional parameters. */ export interface QuotaByCounterKeysListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type QuotaByCounterKeysListByServiceResponse = QuotaCounterCollection; /** Optional parameters. */ export interface QuotaByCounterKeysUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type QuotaByCounterKeysUpdateResponse = QuotaCounterCollection; /** Optional parameters. */ export interface QuotaByPeriodKeysGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type QuotaByPeriodKeysGetResponse = QuotaCounterContract; /** Optional parameters. */ export interface QuotaByPeriodKeysUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type QuotaByPeriodKeysUpdateResponse = QuotaCounterContract; /** Optional parameters. */ export interface RegionListByServiceOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByService operation. */ export type RegionListByServiceResponse = RegionListResult; /** Optional parameters. */ export interface RegionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type RegionListByServiceNextResponse = RegionListResult; /** Optional parameters. */ export interface ReportsListByApiOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByApi operation. */ @@ -10753,13 +10753,13 @@ export type ReportsListByApiResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByUserOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByUser operation. */ @@ -10767,13 +10767,13 @@ export type ReportsListByUserResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByOperationOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByOperation operation. */ @@ -10781,13 +10781,13 @@ export type ReportsListByOperationResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByProductOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByProduct operation. */ @@ -10795,11 +10795,11 @@ export type ReportsListByProductResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByGeoOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByGeo operation. */ @@ -10807,13 +10807,13 @@ export type ReportsListByGeoResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listBySubscription operation. */ @@ -10821,13 +10821,13 @@ export type ReportsListBySubscriptionResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByTimeOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; } /** Contains response data for the listByTime operation. */ @@ -10835,11 +10835,11 @@ export type ReportsListByTimeResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByRequestOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByRequest operation. */ @@ -10847,62 +10847,62 @@ export type ReportsListByRequestResponse = RequestReportCollection; /** Optional parameters. */ export interface ReportsListByApiNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByApiNext operation. */ export type ReportsListByApiNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByUserNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByUserNext operation. */ export type ReportsListByUserNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByOperationNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByOperationNext operation. */ export type ReportsListByOperationNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByProductNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByProductNext operation. */ export type ReportsListByProductNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByGeoNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByGeoNext operation. */ export type ReportsListByGeoNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listBySubscriptionNext operation. */ export type ReportsListBySubscriptionNextResponse = ReportCollection; /** Optional parameters. */ export interface ReportsListByTimeNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByTimeNext operation. */ export type ReportsListByTimeNextResponse = ReportCollection; /** Optional parameters. */ export interface GlobalSchemaListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -10910,50 +10910,50 @@ export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; /** Optional parameters. */ export interface GlobalSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; /** Optional parameters. */ export interface GlobalSchemaGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & - GlobalSchemaContract; + GlobalSchemaContract; /** Optional parameters. */ export interface GlobalSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** 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; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** 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 GlobalSchemaCreateOrUpdateResponse = GlobalSchemaCreateOrUpdateHeaders & - GlobalSchemaContract; + GlobalSchemaContract; /** Optional parameters. */ export interface GlobalSchemaDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface GlobalSchemaListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; /** Optional parameters. */ export interface TenantSettingsListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; + extends coreClient.OperationOptions { + /** Not used */ + filter?: string; } /** Contains response data for the listByService operation. */ @@ -10961,42 +10961,42 @@ export type TenantSettingsListByServiceResponse = TenantSettingsCollection; /** Optional parameters. */ export interface TenantSettingsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TenantSettingsGetResponse = TenantSettingsGetHeaders & - TenantSettingsContract; + TenantSettingsContract; /** Optional parameters. */ export interface TenantSettingsListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TenantSettingsListByServiceNextResponse = TenantSettingsCollection; /** Optional parameters. */ export interface ApiManagementSkusListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type ApiManagementSkusListResponse = ApiManagementSkusResult; /** Optional parameters. */ export interface ApiManagementSkusListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type ApiManagementSkusListNextResponse = ApiManagementSkusResult; /** Optional parameters. */ export interface SubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11004,91 +11004,91 @@ export type SubscriptionListResponse = SubscriptionCollection; /** Optional parameters. */ export interface SubscriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type SubscriptionGetEntityTagResponse = SubscriptionGetEntityTagHeaders; /** Optional parameters. */ export interface SubscriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type SubscriptionGetResponse = SubscriptionGetHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Contains response data for the createOrUpdate operation. */ export type SubscriptionCreateOrUpdateResponse = SubscriptionCreateOrUpdateHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionUpdateOptionalParams - extends coreClient.OperationOptions { - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Contains response data for the update operation. */ export type SubscriptionUpdateResponse = SubscriptionUpdateHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface SubscriptionDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface SubscriptionListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type SubscriptionListSecretsResponse = SubscriptionListSecretsHeaders & - SubscriptionKeysContract; + SubscriptionKeysContract; /** Optional parameters. */ export interface SubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type SubscriptionListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface TagResourceListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -11096,16 +11096,16 @@ export type TagResourceListByServiceResponse = TagResourceCollection; /** Optional parameters. */ export interface TagResourceListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TagResourceListByServiceNextResponse = TagResourceCollection; /** Optional parameters. */ export interface TenantAccessListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; + extends coreClient.OperationOptions { + /** Not used */ + filter?: string; } /** Contains response data for the listByService operation. */ @@ -11113,73 +11113,73 @@ export type TenantAccessListByServiceResponse = AccessInformationCollection; /** Optional parameters. */ export interface TenantAccessGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type TenantAccessGetEntityTagResponse = TenantAccessGetEntityTagHeaders; /** Optional parameters. */ export interface TenantAccessGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type TenantAccessGetResponse = TenantAccessGetHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessCreateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the create operation. */ export type TenantAccessCreateResponse = TenantAccessCreateHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type TenantAccessUpdateResponse = TenantAccessUpdateHeaders & - AccessInformationContract; + AccessInformationContract; /** Optional parameters. */ export interface TenantAccessRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessListSecretsOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listSecrets operation. */ export type TenantAccessListSecretsResponse = TenantAccessListSecretsHeaders & - AccessInformationSecretsContract; + AccessInformationSecretsContract; /** Optional parameters. */ export interface TenantAccessListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type TenantAccessListByServiceNextResponse = AccessInformationCollection; /** Optional parameters. */ export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface TenantConfigurationDeployOptionalParams - 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; + 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 deploy operation. */ @@ -11187,11 +11187,11 @@ export type TenantConfigurationDeployResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationSaveOptionalParams - 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; + 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 save operation. */ @@ -11199,11 +11199,11 @@ export type TenantConfigurationSaveResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationValidateOptionalParams - 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; + 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 validate operation. */ @@ -11211,22 +11211,22 @@ export type TenantConfigurationValidateResponse = OperationResultContract; /** Optional parameters. */ export interface TenantConfigurationGetSyncStateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSyncState operation. */ export type TenantConfigurationGetSyncStateResponse = TenantConfigurationSyncStateContract; /** Optional parameters. */ export interface UserListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Detailed Group in response. */ - expandGroups?: boolean; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Detailed Group in response. */ + expandGroups?: boolean; } /** Contains response data for the listByService operation. */ @@ -11234,76 +11234,76 @@ export type UserListByServiceResponse = UserCollection; /** Optional parameters. */ export interface UserGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type UserGetEntityTagResponse = UserGetEntityTagHeaders; /** Optional parameters. */ -export interface UserGetOptionalParams extends coreClient.OperationOptions {} +export interface UserGetOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type UserGetResponse = UserGetHeaders & UserContract; /** Optional parameters. */ export interface UserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Send an Email notification to the User. */ - notify?: boolean; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Send an Email notification to the User. */ + notify?: boolean; } /** Contains response data for the createOrUpdate operation. */ export type UserCreateOrUpdateResponse = UserCreateOrUpdateHeaders & - UserContract; + UserContract; /** Optional parameters. */ -export interface UserUpdateOptionalParams extends coreClient.OperationOptions {} +export interface UserUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type UserUpdateResponse = UserUpdateHeaders & UserContract; /** Optional parameters. */ export interface UserDeleteOptionalParams extends coreClient.OperationOptions { - /** Whether to delete user's subscription or not. */ - deleteSubscriptions?: boolean; - /** Send an Account Closed Email notification to the User. */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + /** Whether to delete user's subscription or not. */ + deleteSubscriptions?: boolean; + /** Send an Account Closed Email notification to the User. */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Optional parameters. */ export interface UserGenerateSsoUrlOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the generateSsoUrl operation. */ export type UserGenerateSsoUrlResponse = GenerateSsoUrlResult; /** Optional parameters. */ export interface UserGetSharedAccessTokenOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getSharedAccessToken operation. */ export type UserGetSharedAccessTokenResponse = UserTokenResult; /** Optional parameters. */ export interface UserListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type UserListByServiceNextResponse = UserCollection; /** Optional parameters. */ export interface UserGroupListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11311,20 +11311,20 @@ export type UserGroupListResponse = GroupCollection; /** Optional parameters. */ export interface UserGroupListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserGroupListNextResponse = GroupCollection; /** Optional parameters. */ export interface UserSubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the list operation. */ @@ -11332,49 +11332,49 @@ export type UserSubscriptionListResponse = SubscriptionCollection; /** Optional parameters. */ export interface UserSubscriptionGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type UserSubscriptionGetResponse = UserSubscriptionGetHeaders & - SubscriptionContract; + SubscriptionContract; /** Optional parameters. */ export interface UserSubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserSubscriptionListNextResponse = SubscriptionCollection; /** Optional parameters. */ export interface UserIdentitiesListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the list operation. */ export type UserIdentitiesListResponse = UserIdentityCollection; /** Optional parameters. */ export interface UserIdentitiesListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listNext operation. */ export type UserIdentitiesListNextResponse = UserIdentityCollection; /** Optional parameters. */ export interface UserConfirmationPasswordSendOptionalParams - extends coreClient.OperationOptions { - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; + extends coreClient.OperationOptions { + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; } /** Optional parameters. */ export interface DocumentationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; + extends coreClient.OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; } /** Contains response data for the listByService operation. */ @@ -11382,56 +11382,56 @@ export type DocumentationListByServiceResponse = DocumentationCollection; /** Optional parameters. */ export interface DocumentationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the getEntityTag operation. */ export type DocumentationGetEntityTagResponse = DocumentationGetEntityTagHeaders; /** Optional parameters. */ export interface DocumentationGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the get operation. */ export type DocumentationGetResponse = DocumentationGetHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; + extends coreClient.OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; } /** Contains response data for the createOrUpdate operation. */ export type DocumentationCreateOrUpdateResponse = DocumentationCreateOrUpdateHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ export type DocumentationUpdateResponse = DocumentationUpdateHeaders & - DocumentationContract; + DocumentationContract; /** Optional parameters. */ export interface DocumentationDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Optional parameters. */ export interface DocumentationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { } /** Contains response data for the listByServiceNext operation. */ export type DocumentationListByServiceNextResponse = DocumentationCollection; /** Optional parameters. */ export interface ApiManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; } diff --git a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts index 8234e98b768a..90c58923a17d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts @@ -9,18900 +9,18900 @@ import * as coreClient from "@azure/core-client"; export const ApiCollection: coreClient.CompositeMapper = { - serializedName: "ApiCollection", - type: { - name: "Composite", - className: "ApiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiContract" + serializedName: "ApiCollection", + type: { + name: "Composite", + className: "ApiCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiVersionSetContractDetails: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractDetails", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String" - } - }, - versionQueryName: { - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContractDetails", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + xmlName: "versioningScheme", + type: { + name: "String" + } + }, + versionQueryName: { + serializedName: "versionQueryName", + xmlName: "versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + serializedName: "versionHeaderName", + xmlName: "versionHeaderName", + type: { + name: "String" + } + } + } + } }; export const ApiEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "ApiEntityBaseContract", - type: { - name: "Composite", - className: "ApiEntityBaseContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "authenticationSettings", - xmlName: "authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "subscriptionKeyParameterNames", - xmlName: "subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "apiRevision", - xmlName: "apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "apiVersion", - xmlName: "apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "isCurrent", - xmlName: "isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiVersionDescription", - xmlName: "apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "apiVersionSetId", - xmlName: "apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "termsOfServiceUrl", - xmlName: "termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "contact", - xmlName: "contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "license", - xmlName: "license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - } - } - } + serializedName: "ApiEntityBaseContract", + type: { + name: "Composite", + className: "ApiEntityBaseContract", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "authenticationSettings", + xmlName: "authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "subscriptionKeyParameterNames", + xmlName: "subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "apiRevision", + xmlName: "apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "apiVersion", + xmlName: "apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "isCurrent", + xmlName: "isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "isOnline", + readOnly: true, + xmlName: "isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiRevisionDescription", + xmlName: "apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiVersionDescription", + xmlName: "apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "apiVersionSetId", + xmlName: "apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "subscriptionRequired", + xmlName: "subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "termsOfServiceUrl", + xmlName: "termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "contact", + xmlName: "contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "license", + xmlName: "license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + } + } + } }; export const AuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "AuthenticationSettingsContract", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - modelProperties: { - oAuth2: { - serializedName: "oAuth2", - xmlName: "oAuth2", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract" - } - }, - openid: { - serializedName: "openid", - xmlName: "openid", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract" - } - }, - oAuth2AuthenticationSettings: { - serializedName: "oAuth2AuthenticationSettings", - xmlName: "oAuth2AuthenticationSettings", - xmlElementName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract" - } - } - } - }, - openidAuthenticationSettings: { - serializedName: "openidAuthenticationSettings", - xmlName: "openidAuthenticationSettings", - xmlElementName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract" + serializedName: "AuthenticationSettingsContract", + type: { + name: "Composite", + className: "AuthenticationSettingsContract", + modelProperties: { + oAuth2: { + serializedName: "oAuth2", + xmlName: "oAuth2", + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract" + } + }, + openid: { + serializedName: "openid", + xmlName: "openid", + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract" + } + }, + oAuth2AuthenticationSettings: { + serializedName: "oAuth2AuthenticationSettings", + xmlName: "oAuth2AuthenticationSettings", + xmlElementName: "OAuth2AuthenticationSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract" + } + } + } + }, + openidAuthenticationSettings: { + serializedName: "openidAuthenticationSettings", + xmlName: "openidAuthenticationSettings", + xmlElementName: "OpenIdAuthenticationSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract" + } + } + } } - } } - } } - } }; export const OAuth2AuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract", - modelProperties: { - authorizationServerId: { - serializedName: "authorizationServerId", - xmlName: "authorizationServerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String" + serializedName: "OAuth2AuthenticationSettingsContract", + type: { + name: "Composite", + className: "OAuth2AuthenticationSettingsContract", + modelProperties: { + authorizationServerId: { + serializedName: "authorizationServerId", + xmlName: "authorizationServerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdAuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract", - modelProperties: { - openidProviderId: { - serializedName: "openidProviderId", - xmlName: "openidProviderId", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethods", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "OpenIdAuthenticationSettingsContract", + type: { + name: "Composite", + className: "OpenIdAuthenticationSettingsContract", + modelProperties: { + openidProviderId: { + serializedName: "openidProviderId", + xmlName: "openidProviderId", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "bearerTokenSendingMethods", + xmlName: "bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethods", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const SubscriptionKeyParameterNamesContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionKeyParameterNamesContract", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - modelProperties: { - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "String" - } - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "String" + serializedName: "SubscriptionKeyParameterNamesContract", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract", + modelProperties: { + header: { + serializedName: "header", + xmlName: "header", + type: { + name: "String" + } + }, + query: { + serializedName: "query", + xmlName: "query", + type: { + name: "String" + } + } } - } } - } }; export const ApiContactInformation: coreClient.CompositeMapper = { - serializedName: "ApiContactInformation", - type: { - name: "Composite", - className: "ApiContactInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - } - } - } + serializedName: "ApiContactInformation", + type: { + name: "Composite", + className: "ApiContactInformation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + } + } + } }; export const ApiLicenseInformation: coreClient.CompositeMapper = { - serializedName: "ApiLicenseInformation", - type: { - name: "Composite", - className: "ApiLicenseInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" + serializedName: "ApiLicenseInformation", + type: { + name: "Composite", + className: "ApiLicenseInformation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + } } - } } - } }; export const Resource: coreClient.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - } - } - } + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + } + } + } }; export const ErrorResponse: coreClient.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "error.code", - xmlName: "error.code", - type: { - name: "String" - } - }, - message: { - serializedName: "error.message", - xmlName: "error.message", - type: { - name: "String" - } - }, - details: { - serializedName: "error.details", - xmlName: "error.details", - xmlElementName: "ErrorFieldContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "error.code", + xmlName: "error.code", + type: { + name: "String" + } + }, + message: { + serializedName: "error.message", + xmlName: "error.message", + type: { + name: "String" + } + }, + details: { + serializedName: "error.details", + xmlName: "error.details", + xmlElementName: "ErrorFieldContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } } - } } - } } - } }; export const ErrorResponseBody: coreClient.CompositeMapper = { - serializedName: "ErrorResponseBody", - type: { - name: "Composite", - className: "ErrorResponseBody", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - xmlName: "details", - xmlElementName: "ErrorFieldContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" + serializedName: "ErrorResponseBody", + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + xmlName: "details", + xmlElementName: "ErrorFieldContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } } - } } - } } - } }; export const ErrorFieldContract: coreClient.CompositeMapper = { - serializedName: "ErrorFieldContract", - type: { - name: "Composite", - className: "ErrorFieldContract", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - xmlName: "target", - type: { - name: "String" - } - } - } - } + serializedName: "ErrorFieldContract", + type: { + name: "Composite", + className: "ErrorFieldContract", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + xmlName: "target", + type: { + name: "String" + } + } + } + } }; export const ApiCreateOrUpdateParameter: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateParameter", - type: { - name: "Composite", - className: "ApiCreateOrUpdateParameter", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - }, - wsdlSelector: { - serializedName: "properties.wsdlSelector", - xmlName: "properties.wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector" - } - }, - soapApiType: { - serializedName: "properties.apiType", - xmlName: "properties.apiType", - type: { - name: "String" - } - }, - translateRequiredQueryParametersConduct: { - serializedName: "properties.translateRequiredQueryParameters", - xmlName: "properties.translateRequiredQueryParameters", - type: { - name: "String" - } - } - } - } + serializedName: "ApiCreateOrUpdateParameter", + type: { + name: "Composite", + className: "ApiCreateOrUpdateParameter", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + sourceApiId: { + serializedName: "properties.sourceApiId", + xmlName: "properties.sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "properties.apiVersionSet", + xmlName: "properties.apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } + }, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + format: { + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + }, + wsdlSelector: { + serializedName: "properties.wsdlSelector", + xmlName: "properties.wsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector" + } + }, + soapApiType: { + serializedName: "properties.apiType", + xmlName: "properties.apiType", + type: { + name: "String" + } + }, + translateRequiredQueryParametersConduct: { + serializedName: "properties.translateRequiredQueryParameters", + xmlName: "properties.translateRequiredQueryParameters", + type: { + name: "String" + } + } + } + } }; export const ApiCreateOrUpdatePropertiesWsdlSelector: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdatePropertiesWsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector", - modelProperties: { - wsdlServiceName: { - serializedName: "wsdlServiceName", - xmlName: "wsdlServiceName", - type: { - name: "String" - } - }, - wsdlEndpointName: { - serializedName: "wsdlEndpointName", - xmlName: "wsdlEndpointName", - type: { - name: "String" + serializedName: "ApiCreateOrUpdatePropertiesWsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector", + modelProperties: { + wsdlServiceName: { + serializedName: "wsdlServiceName", + xmlName: "wsdlServiceName", + type: { + name: "String" + } + }, + wsdlEndpointName: { + serializedName: "wsdlEndpointName", + xmlName: "wsdlEndpointName", + type: { + name: "String" + } + } } - } } - } }; export const ApiUpdateContract: coreClient.CompositeMapper = { - serializedName: "ApiUpdateContract", - type: { - name: "Composite", - className: "ApiUpdateContract", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiUpdateContract", + type: { + name: "Composite", + className: "ApiUpdateContract", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ApiRevisionCollection: coreClient.CompositeMapper = { - serializedName: "ApiRevisionCollection", - type: { - name: "Composite", - className: "ApiRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiRevisionContract" + serializedName: "ApiRevisionCollection", + type: { + name: "Composite", + className: "ApiRevisionCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiRevisionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiRevisionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiRevisionContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionContract", - type: { - name: "Composite", - className: "ApiRevisionContract", - modelProperties: { - apiId: { - serializedName: "apiId", - readOnly: true, - xmlName: "apiId", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String" - } - }, - createdDateTime: { - serializedName: "createdDateTime", - readOnly: true, - xmlName: "createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "updatedDateTime", - readOnly: true, - xmlName: "updatedDateTime", - type: { - name: "DateTime" - } - }, - description: { - constraints: { - MaxLength: 256 - }, - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String" - } - }, - privateUrl: { - serializedName: "privateUrl", - readOnly: true, - xmlName: "privateUrl", - type: { - name: "String" - } - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean" - } - }, - isCurrent: { - serializedName: "isCurrent", - readOnly: true, - xmlName: "isCurrent", - type: { - name: "Boolean" - } - } - } - } + serializedName: "ApiRevisionContract", + type: { + name: "Composite", + className: "ApiRevisionContract", + modelProperties: { + apiId: { + serializedName: "apiId", + readOnly: true, + xmlName: "apiId", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "apiRevision", + readOnly: true, + xmlName: "apiRevision", + type: { + name: "String" + } + }, + createdDateTime: { + serializedName: "createdDateTime", + readOnly: true, + xmlName: "createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "updatedDateTime", + readOnly: true, + xmlName: "updatedDateTime", + type: { + name: "DateTime" + } + }, + description: { + constraints: { + MaxLength: 256 + }, + serializedName: "description", + readOnly: true, + xmlName: "description", + type: { + name: "String" + } + }, + privateUrl: { + serializedName: "privateUrl", + readOnly: true, + xmlName: "privateUrl", + type: { + name: "String" + } + }, + isOnline: { + serializedName: "isOnline", + readOnly: true, + xmlName: "isOnline", + type: { + name: "Boolean" + } + }, + isCurrent: { + serializedName: "isCurrent", + readOnly: true, + xmlName: "isCurrent", + type: { + name: "Boolean" + } + } + } + } }; export const ApiReleaseCollection: coreClient.CompositeMapper = { - serializedName: "ApiReleaseCollection", - type: { - name: "Composite", - className: "ApiReleaseCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiReleaseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiReleaseContract" + serializedName: "ApiReleaseCollection", + type: { + name: "Composite", + className: "ApiReleaseCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ApiReleaseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiReleaseContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationCollection: coreClient.CompositeMapper = { - serializedName: "OperationCollection", - type: { - name: "Composite", - className: "OperationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "OperationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationContract" + serializedName: "OperationCollection", + type: { + name: "Composite", + className: "OperationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "OperationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "OperationEntityBaseContract", - type: { - name: "Composite", - className: "OperationEntityBaseContract", - modelProperties: { - templateParameters: { - serializedName: "templateParameters", - xmlName: "templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "responses", - xmlName: "responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" + serializedName: "OperationEntityBaseContract", + type: { + name: "Composite", + className: "OperationEntityBaseContract", + modelProperties: { + templateParameters: { + serializedName: "templateParameters", + xmlName: "templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + request: { + serializedName: "request", + xmlName: "request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "responses", + xmlName: "responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "policies", + xmlName: "policies", + type: { + name: "String" + } } - } - } - }, - policies: { - serializedName: "policies", - xmlName: "policies", - type: { - name: "String" } - } } - } }; export const ParameterContract: coreClient.CompositeMapper = { - serializedName: "ParameterContract", - type: { - name: "Composite", - className: "ParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - defaultValue: { - serializedName: "defaultValue", - xmlName: "defaultValue", - type: { - name: "String" - } - }, - required: { - serializedName: "required", - xmlName: "required", - type: { - name: "Boolean" - } - }, - values: { - serializedName: "values", - xmlName: "values", - xmlElementName: "ParameterContractValuesItem", - type: { - name: "Sequence", - element: { + serializedName: "ParameterContract", + type: { + name: "Composite", + className: "ParameterContract", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, type: { - name: "String" + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + defaultValue: { + serializedName: "defaultValue", + xmlName: "defaultValue", + type: { + name: "String" + } + }, + required: { + serializedName: "required", + xmlName: "required", + type: { + name: "Boolean" + } + }, + values: { + serializedName: "values", + xmlName: "values", + xmlElementName: "ParameterContractValuesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + schemaId: { + serializedName: "schemaId", + xmlName: "schemaId", + type: { + name: "String" + } + }, + typeName: { + serializedName: "typeName", + xmlName: "typeName", + type: { + name: "String" + } + }, + examples: { + serializedName: "examples", + xmlName: "examples", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "ParameterExampleContract" } + } + } } - } } - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String" - } - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String" - } - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" } - } - } - } } - } }; export const ParameterExampleContract: coreClient.CompositeMapper = { - serializedName: "ParameterExampleContract", - type: { - name: "Composite", - className: "ParameterExampleContract", - modelProperties: { - summary: { - serializedName: "summary", - xmlName: "summary", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "any" - } - }, - externalValue: { - serializedName: "externalValue", - xmlName: "externalValue", - type: { - name: "String" - } - } - } - } + serializedName: "ParameterExampleContract", + type: { + name: "Composite", + className: "ParameterExampleContract", + modelProperties: { + summary: { + serializedName: "summary", + xmlName: "summary", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "any" + } + }, + externalValue: { + serializedName: "externalValue", + xmlName: "externalValue", + type: { + name: "String" + } + } + } + } }; export const RequestContract: coreClient.CompositeMapper = { - serializedName: "RequestContract", - type: { - name: "Composite", - className: "RequestContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - queryParameters: { - serializedName: "queryParameters", - xmlName: "queryParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract" + serializedName: "RequestContract", + type: { + name: "Composite", + className: "RequestContract", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + queryParameters: { + serializedName: "queryParameters", + xmlName: "queryParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + representations: { + serializedName: "representations", + xmlName: "representations", + xmlElementName: "RepresentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RepresentationContract" + } + } + } } - } } - } } - } }; export const RepresentationContract: coreClient.CompositeMapper = { - serializedName: "RepresentationContract", - type: { - name: "Composite", - className: "RepresentationContract", - modelProperties: { - contentType: { - serializedName: "contentType", - required: true, - xmlName: "contentType", - type: { - name: "String" - } - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String" - } - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String" - } - }, - formParameters: { - serializedName: "formParameters", - xmlName: "formParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" + serializedName: "RepresentationContract", + type: { + name: "Composite", + className: "RepresentationContract", + modelProperties: { + contentType: { + serializedName: "contentType", + required: true, + xmlName: "contentType", + type: { + name: "String" + } + }, + schemaId: { + serializedName: "schemaId", + xmlName: "schemaId", + type: { + name: "String" + } + }, + typeName: { + serializedName: "typeName", + xmlName: "typeName", + type: { + name: "String" + } + }, + formParameters: { + serializedName: "formParameters", + xmlName: "formParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + examples: { + serializedName: "examples", + xmlName: "examples", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "ParameterExampleContract" } + } + } } - } } - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" } - } - } - } } - } }; export const ResponseContract: coreClient.CompositeMapper = { - serializedName: "ResponseContract", - type: { - name: "Composite", - className: "ResponseContract", - modelProperties: { - statusCode: { - serializedName: "statusCode", - required: true, - xmlName: "statusCode", - type: { - name: "Number" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" + serializedName: "ResponseContract", + type: { + name: "Composite", + className: "ResponseContract", + modelProperties: { + statusCode: { + serializedName: "statusCode", + required: true, + xmlName: "statusCode", + type: { + name: "Number" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + representations: { + serializedName: "representations", + xmlName: "representations", + xmlElementName: "RepresentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RepresentationContract" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } } - } } - } } - } }; export const OperationUpdateContract: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContract", - type: { - name: "Composite", - className: "OperationUpdateContract", - modelProperties: { - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" - } - } - } - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationUpdateContract", + type: { + name: "Composite", + className: "OperationUpdateContract", + modelProperties: { + templateParameters: { + serializedName: "properties.templateParameters", + xmlName: "properties.templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + request: { + serializedName: "properties.request", + xmlName: "properties.request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "properties.responses", + xmlName: "properties.responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "properties.policies", + xmlName: "properties.policies", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "properties.method", + xmlName: "properties.method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.urlTemplate", + xmlName: "properties.urlTemplate", + type: { + name: "String" + } + } + } + } }; export const PolicyCollection: coreClient.CompositeMapper = { - serializedName: "PolicyCollection", - type: { - name: "Composite", - className: "PolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyContract" + serializedName: "PolicyCollection", + type: { + name: "Composite", + className: "PolicyCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagCollection: coreClient.CompositeMapper = { - serializedName: "TagCollection", - type: { - name: "Composite", - className: "TagCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagContract" + serializedName: "TagCollection", + type: { + name: "Composite", + className: "TagCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ResolverCollection: coreClient.CompositeMapper = { - serializedName: "ResolverCollection", - type: { - name: "Composite", - className: "ResolverCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ResolverContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverContract" + serializedName: "ResolverCollection", + type: { + name: "Composite", + className: "ResolverCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ResolverContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResolverContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResolverUpdateContract: coreClient.CompositeMapper = { - serializedName: "ResolverUpdateContract", - type: { - name: "Composite", - className: "ResolverUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverUpdateContract", + type: { + name: "Composite", + className: "ResolverUpdateContract", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const ProductCollection: coreClient.CompositeMapper = { - serializedName: "ProductCollection", - type: { - name: "Composite", - className: "ProductCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ProductContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProductContract" + serializedName: "ProductCollection", + type: { + name: "Composite", + className: "ProductCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ProductContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProductContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ProductEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "ProductEntityBaseParameters", - type: { - name: "Composite", - className: "ProductEntityBaseParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - terms: { - serializedName: "terms", - xmlName: "terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "approvalRequired", - xmlName: "approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "subscriptionsLimit", - xmlName: "subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - } - } - } + serializedName: "ProductEntityBaseParameters", + type: { + name: "Composite", + className: "ProductEntityBaseParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + terms: { + serializedName: "terms", + xmlName: "terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "subscriptionRequired", + xmlName: "subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "approvalRequired", + xmlName: "approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "subscriptionsLimit", + xmlName: "subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "state", + xmlName: "state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + } + } + } }; export const SchemaCollection: coreClient.CompositeMapper = { - serializedName: "SchemaCollection", - type: { - name: "Composite", - className: "SchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "SchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SchemaContract" + serializedName: "SchemaCollection", + type: { + name: "Composite", + className: "SchemaCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "SchemaContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SchemaContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DiagnosticCollection: coreClient.CompositeMapper = { - serializedName: "DiagnosticCollection", - type: { - name: "Composite", - className: "DiagnosticCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "DiagnosticContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticContract" + serializedName: "DiagnosticCollection", + type: { + name: "Composite", + className: "DiagnosticCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "DiagnosticContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const SamplingSettings: coreClient.CompositeMapper = { - serializedName: "SamplingSettings", - type: { - name: "Composite", - className: "SamplingSettings", - modelProperties: { - samplingType: { - serializedName: "samplingType", - xmlName: "samplingType", - type: { - name: "String" - } - }, - percentage: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - serializedName: "percentage", - xmlName: "percentage", - type: { - name: "Number" - } - } - } - } + serializedName: "SamplingSettings", + type: { + name: "Composite", + className: "SamplingSettings", + modelProperties: { + samplingType: { + serializedName: "samplingType", + xmlName: "samplingType", + type: { + name: "String" + } + }, + percentage: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentage", + xmlName: "percentage", + type: { + name: "Number" + } + } + } + } }; export const PipelineDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "PipelineDiagnosticSettings", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - modelProperties: { - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "HttpMessageDiagnostic" - } - }, - response: { - serializedName: "response", - xmlName: "response", - type: { - name: "Composite", - className: "HttpMessageDiagnostic" - } - } - } - } + serializedName: "PipelineDiagnosticSettings", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings", + modelProperties: { + request: { + serializedName: "request", + xmlName: "request", + type: { + name: "Composite", + className: "HttpMessageDiagnostic" + } + }, + response: { + serializedName: "response", + xmlName: "response", + type: { + name: "Composite", + className: "HttpMessageDiagnostic" + } + } + } + } }; export const HttpMessageDiagnostic: coreClient.CompositeMapper = { - serializedName: "HttpMessageDiagnostic", - type: { - name: "Composite", - className: "HttpMessageDiagnostic", - modelProperties: { - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpMessageDiagnosticHeadersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "HttpMessageDiagnostic", + type: { + name: "Composite", + className: "HttpMessageDiagnostic", + modelProperties: { + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "HttpMessageDiagnosticHeadersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + body: { + serializedName: "body", + xmlName: "body", + type: { + name: "Composite", + className: "BodyDiagnosticSettings" + } + }, + dataMasking: { + serializedName: "dataMasking", + xmlName: "dataMasking", + type: { + name: "Composite", + className: "DataMasking" + } } - } - } - }, - body: { - serializedName: "body", - xmlName: "body", - type: { - name: "Composite", - className: "BodyDiagnosticSettings" } - }, - dataMasking: { - serializedName: "dataMasking", - xmlName: "dataMasking", - type: { - name: "Composite", - className: "DataMasking" - } - } } - } }; export const BodyDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "BodyDiagnosticSettings", - type: { - name: "Composite", - className: "BodyDiagnosticSettings", - modelProperties: { - bytes: { - constraints: { - InclusiveMaximum: 8192 - }, - serializedName: "bytes", - xmlName: "bytes", - type: { - name: "Number" + serializedName: "BodyDiagnosticSettings", + type: { + name: "Composite", + className: "BodyDiagnosticSettings", + modelProperties: { + bytes: { + constraints: { + InclusiveMaximum: 8192 + }, + serializedName: "bytes", + xmlName: "bytes", + type: { + name: "Number" + } + } } - } } - } }; export const DataMasking: coreClient.CompositeMapper = { - serializedName: "DataMasking", - type: { - name: "Composite", - className: "DataMasking", - modelProperties: { - queryParams: { - serializedName: "queryParams", - xmlName: "queryParams", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity" + serializedName: "DataMasking", + type: { + name: "Composite", + className: "DataMasking", + modelProperties: { + queryParams: { + serializedName: "queryParams", + xmlName: "queryParams", + xmlElementName: "DataMaskingEntity", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingEntity" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "DataMaskingEntity", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingEntity" + } + } + } } - } } - } } - } }; export const DataMaskingEntity: coreClient.CompositeMapper = { - serializedName: "DataMaskingEntity", - type: { - name: "Composite", - className: "DataMaskingEntity", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - mode: { - serializedName: "mode", - xmlName: "mode", - type: { - name: "String" + serializedName: "DataMaskingEntity", + type: { + name: "Composite", + className: "DataMaskingEntity", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + mode: { + serializedName: "mode", + xmlName: "mode", + type: { + name: "String" + } + } } - } } - } }; export const IssueCollection: coreClient.CompositeMapper = { - serializedName: "IssueCollection", - type: { - name: "Composite", - className: "IssueCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueContract" + serializedName: "IssueCollection", + type: { + name: "Composite", + className: "IssueCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const IssueContractBaseProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractBaseProperties", - type: { - name: "Composite", - className: "IssueContractBaseProperties", - modelProperties: { - createdDate: { - serializedName: "createdDate", - xmlName: "createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContractBaseProperties", + type: { + name: "Composite", + className: "IssueContractBaseProperties", + modelProperties: { + createdDate: { + serializedName: "createdDate", + xmlName: "createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "state", + xmlName: "state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + } + } + } }; export const IssueUpdateContract: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContract", - type: { - name: "Composite", - className: "IssueUpdateContract", - modelProperties: { - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueUpdateContract", + type: { + name: "Composite", + className: "IssueUpdateContract", + modelProperties: { + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueCommentCollection: coreClient.CompositeMapper = { - serializedName: "IssueCommentCollection", - type: { - name: "Composite", - className: "IssueCommentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueCommentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueCommentContract" + serializedName: "IssueCommentCollection", + type: { + name: "Composite", + className: "IssueCommentCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueCommentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueCommentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const IssueAttachmentCollection: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentCollection", - type: { - name: "Composite", - className: "IssueAttachmentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueAttachmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueAttachmentContract" + serializedName: "IssueAttachmentCollection", + type: { + name: "Composite", + className: "IssueAttachmentCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "IssueAttachmentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IssueAttachmentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCollection", - type: { - name: "Composite", - className: "TagDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagDescriptionContract" + serializedName: "TagDescriptionCollection", + type: { + name: "Composite", + className: "TagDescriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagDescriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagDescriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagDescriptionBaseProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionBaseProperties", - type: { - name: "Composite", - className: "TagDescriptionBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "externalDocsUrl", - xmlName: "externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "externalDocsDescription", - xmlName: "externalDocsDescription", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionBaseProperties", + type: { + name: "Composite", + className: "TagDescriptionBaseProperties", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "externalDocsUrl", + xmlName: "externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "externalDocsDescription", + xmlName: "externalDocsDescription", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCreateParameters", - type: { - name: "Composite", - className: "TagDescriptionCreateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionCreateParameters", + type: { + name: "Composite", + className: "TagDescriptionCreateParameters", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.externalDocsUrl", + xmlName: "properties.externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "properties.externalDocsDescription", + xmlName: "properties.externalDocsDescription", + type: { + name: "String" + } + } + } + } }; export const TagResourceCollection: coreClient.CompositeMapper = { - serializedName: "TagResourceCollection", - type: { - name: "Composite", - className: "TagResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagResourceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagResourceContract" + serializedName: "TagResourceCollection", + type: { + name: "Composite", + className: "TagResourceCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "TagResourceContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TagResourceContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const TagResourceContract: coreClient.CompositeMapper = { - serializedName: "TagResourceContract", - type: { - name: "Composite", - className: "TagResourceContract", - modelProperties: { - tag: { - serializedName: "tag", - xmlName: "tag", - type: { - name: "Composite", - className: "TagResourceContractProperties" - } - }, - api: { - serializedName: "api", - xmlName: "api", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties" - } - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties" - } - }, - product: { - serializedName: "product", - xmlName: "product", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties" - } - } - } - } + serializedName: "TagResourceContract", + type: { + name: "Composite", + className: "TagResourceContract", + modelProperties: { + tag: { + serializedName: "tag", + xmlName: "tag", + type: { + name: "Composite", + className: "TagResourceContractProperties" + } + }, + api: { + serializedName: "api", + xmlName: "api", + type: { + name: "Composite", + className: "ApiTagResourceContractProperties" + } + }, + operation: { + serializedName: "operation", + xmlName: "operation", + type: { + name: "Composite", + className: "OperationTagResourceContractProperties" + } + }, + product: { + serializedName: "product", + xmlName: "product", + type: { + name: "Composite", + className: "ProductTagResourceContractProperties" + } + } + } + } }; export const TagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "TagResourceContractProperties", - type: { - name: "Composite", - className: "TagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - } - } - } + serializedName: "TagResourceContractProperties", + type: { + name: "Composite", + className: "TagResourceContractProperties", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + } + } + } }; export const OperationTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationTagResourceContractProperties", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - apiName: { - serializedName: "apiName", - readOnly: true, - xmlName: "apiName", - type: { - name: "String" - } - }, - apiRevision: { - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - serializedName: "apiVersion", - readOnly: true, - xmlName: "apiVersion", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - readOnly: true, - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - serializedName: "urlTemplate", - readOnly: true, - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationTagResourceContractProperties", + type: { + name: "Composite", + className: "OperationTagResourceContractProperties", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + apiName: { + serializedName: "apiName", + readOnly: true, + xmlName: "apiName", + type: { + name: "String" + } + }, + apiRevision: { + serializedName: "apiRevision", + readOnly: true, + xmlName: "apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + serializedName: "apiVersion", + readOnly: true, + xmlName: "apiVersion", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + xmlName: "description", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + readOnly: true, + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + serializedName: "urlTemplate", + readOnly: true, + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const WikiDocumentationContract: coreClient.CompositeMapper = { - serializedName: "WikiDocumentationContract", - type: { - name: "Composite", - className: "WikiDocumentationContract", - modelProperties: { - documentationId: { - serializedName: "documentationId", - xmlName: "documentationId", - type: { - name: "String" + serializedName: "WikiDocumentationContract", + type: { + name: "Composite", + className: "WikiDocumentationContract", + modelProperties: { + documentationId: { + serializedName: "documentationId", + xmlName: "documentationId", + type: { + name: "String" + } + } } - } } - } }; export const WikiUpdateContract: coreClient.CompositeMapper = { - serializedName: "WikiUpdateContract", - type: { - name: "Composite", - className: "WikiUpdateContract", - modelProperties: { - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract" + serializedName: "WikiUpdateContract", + type: { + name: "Composite", + className: "WikiUpdateContract", + modelProperties: { + documents: { + serializedName: "properties.documents", + xmlName: "properties.documents", + xmlElementName: "WikiDocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiDocumentationContract" + } + } + } } - } } - } } - } }; export const WikiCollection: coreClient.CompositeMapper = { - serializedName: "WikiCollection", - type: { - name: "Composite", - className: "WikiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "WikiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiContract" + serializedName: "WikiCollection", + type: { + name: "Composite", + className: "WikiCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "WikiContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiExportResult: coreClient.CompositeMapper = { - serializedName: "ApiExportResult", - type: { - name: "Composite", - className: "ApiExportResult", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - exportResultFormat: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "ApiExportResultValue" - } - } - } - } + serializedName: "ApiExportResult", + type: { + name: "Composite", + className: "ApiExportResult", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + exportResultFormat: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "Composite", + className: "ApiExportResultValue" + } + } + } + } }; export const ApiExportResultValue: coreClient.CompositeMapper = { - serializedName: "ApiExportResultValue", - type: { - name: "Composite", - className: "ApiExportResultValue", - modelProperties: { - link: { - serializedName: "link", - xmlName: "link", - type: { - name: "String" + serializedName: "ApiExportResultValue", + type: { + name: "Composite", + className: "ApiExportResultValue", + modelProperties: { + link: { + serializedName: "link", + xmlName: "link", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetCollection: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetCollection", - type: { - name: "Composite", - className: "ApiVersionSetCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ApiVersionSetContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiVersionSetContract" + serializedName: "ApiVersionSetCollection", + type: { + name: "Composite", + className: "ApiVersionSetCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ApiVersionSetContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiVersionSetContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiVersionSetEntityBase: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetEntityBase", - type: { - name: "Composite", - className: "ApiVersionSetEntityBase", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetEntityBase", + type: { + name: "Composite", + className: "ApiVersionSetEntityBase", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "versionQueryName", + xmlName: "versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "versionHeaderName", + xmlName: "versionHeaderName", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetUpdateParameters", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetUpdateParameters", + type: { + name: "Composite", + className: "ApiVersionSetUpdateParameters", + modelProperties: { + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionQueryName", + xmlName: "properties.versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionHeaderName", + xmlName: "properties.versionHeaderName", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "properties.versioningScheme", + xmlName: "properties.versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerCollection", - type: { - name: "Composite", - className: "AuthorizationServerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationServerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationServerContract" + serializedName: "AuthorizationServerCollection", + type: { + name: "Composite", + className: "AuthorizationServerCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationServerContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationServerContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const AuthorizationServerContractBaseProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContractBaseProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "authorizationMethods", - xmlName: "authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "clientAuthenticationMethod", - xmlName: "clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "tokenBodyParameters", - xmlName: "tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "tokenEndpoint", - xmlName: "tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "supportState", - xmlName: "supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "defaultScope", - xmlName: "defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContractBaseProperties", + type: { + name: "Composite", + className: "AuthorizationServerContractBaseProperties", + modelProperties: { + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "authorizationMethods", + xmlName: "authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "clientAuthenticationMethod", + xmlName: "clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "tokenBodyParameters", + xmlName: "tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "tokenEndpoint", + xmlName: "tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "supportState", + xmlName: "supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "defaultScope", + xmlName: "defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "bearerTokenSendingMethods", + xmlName: "bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "resourceOwnerUsername", + xmlName: "resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "resourceOwnerPassword", + xmlName: "resourceOwnerPassword", + type: { + name: "String" + } } - } } - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String" - } - } } - } }; export const TokenBodyParameterContract: coreClient.CompositeMapper = { - serializedName: "TokenBodyParameterContract", - type: { - name: "Composite", - className: "TokenBodyParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "TokenBodyParameterContract", + type: { + name: "Composite", + className: "TokenBodyParameterContract", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerSecretsContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerSecretsContract", - type: { - name: "Composite", - className: "AuthorizationServerSecretsContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationServerSecretsContract", + type: { + name: "Composite", + className: "AuthorizationServerSecretsContract", + modelProperties: { + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + }, + resourceOwnerUsername: { + serializedName: "resourceOwnerUsername", + xmlName: "resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "resourceOwnerPassword", + xmlName: "resourceOwnerPassword", + type: { + name: "String" + } + } + } + } }; export const AuthorizationProviderCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderCollection", - type: { - name: "Composite", - className: "AuthorizationProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationProviderContract" + serializedName: "AuthorizationProviderCollection", + type: { + name: "Composite", + className: "AuthorizationProviderCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationProviderContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const AuthorizationProviderOAuth2Settings: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderOAuth2Settings", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings", - modelProperties: { - redirectUrl: { - serializedName: "redirectUrl", - xmlName: "redirectUrl", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes" - } - } - } - } + serializedName: "AuthorizationProviderOAuth2Settings", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2Settings", + modelProperties: { + redirectUrl: { + serializedName: "redirectUrl", + xmlName: "redirectUrl", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + xmlName: "grantTypes", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2GrantTypes" + } + } + } + } }; export const AuthorizationProviderOAuth2GrantTypes: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderOAuth2GrantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes", - modelProperties: { - authorizationCode: { - serializedName: "authorizationCode", - xmlName: "authorizationCode", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - clientCredentials: { - serializedName: "clientCredentials", - xmlName: "clientCredentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + serializedName: "AuthorizationProviderOAuth2GrantTypes", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2GrantTypes", + modelProperties: { + authorizationCode: { + serializedName: "authorizationCode", + xmlName: "authorizationCode", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + clientCredentials: { + serializedName: "clientCredentials", + xmlName: "clientCredentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } }; export const AuthorizationCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationCollection", - type: { - name: "Composite", - className: "AuthorizationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationContract" + serializedName: "AuthorizationCollection", + type: { + name: "Composite", + className: "AuthorizationCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const AuthorizationError: coreClient.CompositeMapper = { - serializedName: "AuthorizationError", - type: { - name: "Composite", - className: "AuthorizationError", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" + serializedName: "AuthorizationError", + type: { + name: "Composite", + className: "AuthorizationError", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginRequestContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginRequestContract", - type: { - name: "Composite", - className: "AuthorizationLoginRequestContract", - modelProperties: { - postLoginRedirectUrl: { - serializedName: "postLoginRedirectUrl", - xmlName: "postLoginRedirectUrl", - type: { - name: "String" + serializedName: "AuthorizationLoginRequestContract", + type: { + name: "Composite", + className: "AuthorizationLoginRequestContract", + modelProperties: { + postLoginRedirectUrl: { + serializedName: "postLoginRedirectUrl", + xmlName: "postLoginRedirectUrl", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginResponseContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginResponseContract", - type: { - name: "Composite", - className: "AuthorizationLoginResponseContract", - modelProperties: { - loginLink: { - serializedName: "loginLink", - xmlName: "loginLink", - type: { - name: "String" + serializedName: "AuthorizationLoginResponseContract", + type: { + name: "Composite", + className: "AuthorizationLoginResponseContract", + modelProperties: { + loginLink: { + serializedName: "loginLink", + xmlName: "loginLink", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationConfirmConsentCodeRequestContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationConfirmConsentCodeRequestContract", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeRequestContract", - modelProperties: { - consentCode: { - serializedName: "consentCode", - xmlName: "consentCode", - type: { - name: "String" + serializedName: "AuthorizationConfirmConsentCodeRequestContract", + type: { + name: "Composite", + className: "AuthorizationConfirmConsentCodeRequestContract", + modelProperties: { + consentCode: { + serializedName: "consentCode", + xmlName: "consentCode", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyCollection", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationAccessPolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract" + serializedName: "AuthorizationAccessPolicyCollection", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "AuthorizationAccessPolicyContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthorizationAccessPolicyContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const BackendCollection: coreClient.CompositeMapper = { - serializedName: "BackendCollection", - type: { - name: "Composite", - className: "BackendCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "BackendContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendContract" + serializedName: "BackendCollection", + type: { + name: "Composite", + className: "BackendCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "BackendContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackendContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const BackendBaseParameters: coreClient.CompositeMapper = { - serializedName: "BackendBaseParameters", - type: { - name: "Composite", - className: "BackendBaseParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "resourceId", - xmlName: "resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "credentials", - xmlName: "credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "proxy", - xmlName: "proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "tls", - xmlName: "tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - } - } - } + serializedName: "BackendBaseParameters", + type: { + name: "Composite", + className: "BackendBaseParameters", + modelProperties: { + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "resourceId", + xmlName: "resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "credentials", + xmlName: "credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "proxy", + xmlName: "proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "tls", + xmlName: "tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + } + } + } }; export const BackendProperties: coreClient.CompositeMapper = { - serializedName: "BackendProperties", - type: { - name: "Composite", - className: "BackendProperties", - modelProperties: { - serviceFabricCluster: { - serializedName: "serviceFabricCluster", - xmlName: "serviceFabricCluster", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties" + serializedName: "BackendProperties", + type: { + name: "Composite", + className: "BackendProperties", + modelProperties: { + serviceFabricCluster: { + serializedName: "serviceFabricCluster", + xmlName: "serviceFabricCluster", + type: { + name: "Composite", + className: "BackendServiceFabricClusterProperties" + } + } } - } } - } }; export const BackendServiceFabricClusterProperties: coreClient.CompositeMapper = { - serializedName: "BackendServiceFabricClusterProperties", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties", - modelProperties: { - clientCertificateId: { - serializedName: "clientCertificateId", - xmlName: "clientCertificateId", - type: { - name: "String" - } - }, - clientCertificatethumbprint: { - serializedName: "clientCertificatethumbprint", - xmlName: "clientCertificatethumbprint", - type: { - name: "String" - } - }, - maxPartitionResolutionRetries: { - serializedName: "maxPartitionResolutionRetries", - xmlName: "maxPartitionResolutionRetries", - type: { - name: "Number" - } - }, - managementEndpoints: { - serializedName: "managementEndpoints", - required: true, - xmlName: "managementEndpoints", - xmlElementName: - "BackendServiceFabricClusterPropertiesManagementEndpointsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - serverCertificateThumbprints: { - serializedName: "serverCertificateThumbprints", - xmlName: "serverCertificateThumbprints", - xmlElementName: - "BackendServiceFabricClusterPropertiesServerCertificateThumbprintsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - serverX509Names: { - serializedName: "serverX509Names", - xmlName: "serverX509Names", - xmlElementName: "X509CertificateName", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "X509CertificateName" + serializedName: "BackendServiceFabricClusterProperties", + type: { + name: "Composite", + className: "BackendServiceFabricClusterProperties", + modelProperties: { + clientCertificateId: { + serializedName: "clientCertificateId", + xmlName: "clientCertificateId", + type: { + name: "String" + } + }, + clientCertificatethumbprint: { + serializedName: "clientCertificatethumbprint", + xmlName: "clientCertificatethumbprint", + type: { + name: "String" + } + }, + maxPartitionResolutionRetries: { + serializedName: "maxPartitionResolutionRetries", + xmlName: "maxPartitionResolutionRetries", + type: { + name: "Number" + } + }, + managementEndpoints: { + serializedName: "managementEndpoints", + required: true, + xmlName: "managementEndpoints", + xmlElementName: + "BackendServiceFabricClusterPropertiesManagementEndpointsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + serverCertificateThumbprints: { + serializedName: "serverCertificateThumbprints", + xmlName: "serverCertificateThumbprints", + xmlElementName: + "BackendServiceFabricClusterPropertiesServerCertificateThumbprintsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + serverX509Names: { + serializedName: "serverX509Names", + xmlName: "serverX509Names", + xmlElementName: "X509CertificateName", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "X509CertificateName" + } + } + } } - } } - } } - } }; export const X509CertificateName: coreClient.CompositeMapper = { - serializedName: "X509CertificateName", - type: { - name: "Composite", - className: "X509CertificateName", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - issuerCertificateThumbprint: { - serializedName: "issuerCertificateThumbprint", - xmlName: "issuerCertificateThumbprint", - type: { - name: "String" + serializedName: "X509CertificateName", + type: { + name: "Composite", + className: "X509CertificateName", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + issuerCertificateThumbprint: { + serializedName: "issuerCertificateThumbprint", + xmlName: "issuerCertificateThumbprint", + type: { + name: "String" + } + } } - } } - } }; export const BackendCredentialsContract: coreClient.CompositeMapper = { - serializedName: "BackendCredentialsContract", - type: { - name: "Composite", - className: "BackendCredentialsContract", - modelProperties: { - certificateIds: { - constraints: { - MaxItems: 32 - }, - serializedName: "certificateIds", - xmlName: "certificateIds", - xmlElementName: "BackendCredentialsContractCertificateIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - certificate: { - constraints: { - MaxItems: 32 - }, - serializedName: "certificate", - xmlName: "certificate", - xmlElementName: "BackendCredentialsContractCertificateItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } } - } - } - }, - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } } - } - } - }, - authorization: { - serializedName: "authorization", - xmlName: "authorization", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials" - } - } - } - } + serializedName: "BackendCredentialsContract", + type: { + name: "Composite", + className: "BackendCredentialsContract", + modelProperties: { + certificateIds: { + constraints: { + MaxItems: 32 + }, + serializedName: "certificateIds", + xmlName: "certificateIds", + xmlElementName: "BackendCredentialsContractCertificateIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + certificate: { + constraints: { + MaxItems: 32 + }, + serializedName: "certificate", + xmlName: "certificate", + xmlElementName: "BackendCredentialsContractCertificateItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + query: { + serializedName: "query", + xmlName: "query", + type: { + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } + } + }, + header: { + serializedName: "header", + xmlName: "header", + type: { + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } + } + }, + authorization: { + serializedName: "authorization", + xmlName: "authorization", + type: { + name: "Composite", + className: "BackendAuthorizationHeaderCredentials" + } + } + } + } }; export const BackendAuthorizationHeaderCredentials: coreClient.CompositeMapper = { - serializedName: "BackendAuthorizationHeaderCredentials", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials", - modelProperties: { - scheme: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "scheme", - required: true, - xmlName: "scheme", - type: { - name: "String" - } - }, - parameter: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "parameter", - required: true, - xmlName: "parameter", - type: { - name: "String" - } - } - } - } + serializedName: "BackendAuthorizationHeaderCredentials", + type: { + name: "Composite", + className: "BackendAuthorizationHeaderCredentials", + modelProperties: { + scheme: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "scheme", + required: true, + xmlName: "scheme", + type: { + name: "String" + } + }, + parameter: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "parameter", + required: true, + xmlName: "parameter", + type: { + name: "String" + } + } + } + } }; export const BackendProxyContract: coreClient.CompositeMapper = { - serializedName: "BackendProxyContract", - type: { - name: "Composite", - className: "BackendProxyContract", - modelProperties: { - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - xmlName: "username", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - } - } - } + serializedName: "BackendProxyContract", + type: { + name: "Composite", + className: "BackendProxyContract", + modelProperties: { + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String" + } + }, + username: { + serializedName: "username", + xmlName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + } + } + } }; export const BackendTlsProperties: coreClient.CompositeMapper = { - serializedName: "BackendTlsProperties", - type: { - name: "Composite", - className: "BackendTlsProperties", - modelProperties: { - validateCertificateChain: { - defaultValue: true, - serializedName: "validateCertificateChain", - xmlName: "validateCertificateChain", - type: { - name: "Boolean" - } - }, - validateCertificateName: { - defaultValue: true, - serializedName: "validateCertificateName", - xmlName: "validateCertificateName", - type: { - name: "Boolean" - } - } - } - } + serializedName: "BackendTlsProperties", + type: { + name: "Composite", + className: "BackendTlsProperties", + modelProperties: { + validateCertificateChain: { + defaultValue: true, + serializedName: "validateCertificateChain", + xmlName: "validateCertificateChain", + type: { + name: "Boolean" + } + }, + validateCertificateName: { + defaultValue: true, + serializedName: "validateCertificateName", + xmlName: "validateCertificateName", + type: { + name: "Boolean" + } + } + } + } }; export const BackendUpdateParameters: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameters", - type: { - name: "Composite", - className: "BackendUpdateParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendUpdateParameters", + type: { + name: "Composite", + className: "BackendUpdateParameters", + modelProperties: { + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties", + xmlName: "properties.properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "properties.proxy", + xmlName: "properties.proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "properties.tls", + xmlName: "properties.tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + }, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "properties.protocol", + xmlName: "properties.protocol", + type: { + name: "String" + } + } + } + } }; export const CacheCollection: coreClient.CompositeMapper = { - serializedName: "CacheCollection", - type: { - name: "Composite", - className: "CacheCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CacheContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CacheContract" + serializedName: "CacheCollection", + type: { + name: "Composite", + className: "CacheCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "CacheContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CacheContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const CacheUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CacheUpdateParameters", - type: { - name: "Composite", - className: "CacheUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - connectionString: { - constraints: { - MaxLength: 300 - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String" - } - }, - useFromLocation: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "CacheUpdateParameters", + type: { + name: "Composite", + className: "CacheUpdateParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + connectionString: { + constraints: { + MaxLength: 300 + }, + serializedName: "properties.connectionString", + xmlName: "properties.connectionString", + type: { + name: "String" + } + }, + useFromLocation: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.useFromLocation", + xmlName: "properties.useFromLocation", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const CertificateCollection: coreClient.CompositeMapper = { - serializedName: "CertificateCollection", - type: { - name: "Composite", - className: "CertificateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CertificateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateContract" + serializedName: "CertificateCollection", + type: { + name: "Composite", + className: "CertificateCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "CertificateContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const KeyVaultLastAccessStatusContractProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultLastAccessStatusContractProperties", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String" - } - }, - timeStampUtc: { - serializedName: "timeStampUtc", - xmlName: "timeStampUtc", - type: { - name: "DateTime" - } - } - } - } + serializedName: "KeyVaultLastAccessStatusContractProperties", + type: { + name: "Composite", + className: "KeyVaultLastAccessStatusContractProperties", + modelProperties: { + code: { + serializedName: "code", + xmlName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + xmlName: "message", + type: { + name: "String" + } + }, + timeStampUtc: { + serializedName: "timeStampUtc", + xmlName: "timeStampUtc", + type: { + name: "DateTime" + } + } + } + } }; export const KeyVaultContractCreateProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractCreateProperties", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - modelProperties: { - secretIdentifier: { - serializedName: "secretIdentifier", - xmlName: "secretIdentifier", - type: { - name: "String" - } - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String" + serializedName: "KeyVaultContractCreateProperties", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties", + modelProperties: { + secretIdentifier: { + serializedName: "secretIdentifier", + xmlName: "secretIdentifier", + type: { + name: "String" + } + }, + identityClientId: { + serializedName: "identityClientId", + xmlName: "identityClientId", + type: { + name: "String" + } + } } - } } - } }; export const CertificateCreateOrUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CertificateCreateOrUpdateParameters", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateParameters", - modelProperties: { - data: { - serializedName: "properties.data", - xmlName: "properties.data", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "CertificateCreateOrUpdateParameters", + type: { + name: "Composite", + className: "CertificateCreateOrUpdateParameters", + modelProperties: { + data: { + serializedName: "properties.data", + xmlName: "properties.data", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const ConnectivityCheckRequest: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequest", - type: { - name: "Composite", - className: "ConnectivityCheckRequest", - modelProperties: { - source: { - serializedName: "source", - xmlName: "source", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource" - } - }, - destination: { - serializedName: "destination", - xmlName: "destination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination" - } - }, - preferredIPVersion: { - serializedName: "preferredIPVersion", - xmlName: "preferredIPVersion", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String" - } - }, - protocolConfiguration: { - serializedName: "protocolConfiguration", - xmlName: "protocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration" - } - } - } - } + serializedName: "ConnectivityCheckRequest", + type: { + name: "Composite", + className: "ConnectivityCheckRequest", + modelProperties: { + source: { + serializedName: "source", + xmlName: "source", + type: { + name: "Composite", + className: "ConnectivityCheckRequestSource" + } + }, + destination: { + serializedName: "destination", + xmlName: "destination", + type: { + name: "Composite", + className: "ConnectivityCheckRequestDestination" + } + }, + preferredIPVersion: { + serializedName: "preferredIPVersion", + xmlName: "preferredIPVersion", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + xmlName: "protocol", + type: { + name: "String" + } + }, + protocolConfiguration: { + serializedName: "protocolConfiguration", + xmlName: "protocolConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfiguration" + } + } + } + } }; export const ConnectivityCheckRequestSource: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestSource", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource", - modelProperties: { - region: { - serializedName: "region", - required: true, - xmlName: "region", - type: { - name: "String" - } - }, - instance: { - serializedName: "instance", - xmlName: "instance", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckRequestSource", + type: { + name: "Composite", + className: "ConnectivityCheckRequestSource", + modelProperties: { + region: { + serializedName: "region", + required: true, + xmlName: "region", + type: { + name: "String" + } + }, + instance: { + serializedName: "instance", + xmlName: "instance", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityCheckRequestDestination: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestDestination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination", - modelProperties: { - address: { - serializedName: "address", - required: true, - xmlName: "address", - type: { - name: "String" - } - }, - port: { - serializedName: "port", - required: true, - xmlName: "port", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckRequestDestination", + type: { + name: "Composite", + className: "ConnectivityCheckRequestDestination", + modelProperties: { + address: { + serializedName: "address", + required: true, + xmlName: "address", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + required: true, + xmlName: "port", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityCheckRequestProtocolConfiguration: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestProtocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration", - modelProperties: { - httpConfiguration: { - serializedName: "HTTPConfiguration", - xmlName: "HTTPConfiguration", - type: { - name: "Composite", - className: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration" + serializedName: "ConnectivityCheckRequestProtocolConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfiguration", + modelProperties: { + httpConfiguration: { + serializedName: "HTTPConfiguration", + xmlName: "HTTPConfiguration", + type: { + name: "Composite", + className: + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration" + } + } } - } } - } }; export const ConnectivityCheckRequestProtocolConfigurationHttpConfiguration: coreClient.CompositeMapper = { - serializedName: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - modelProperties: { - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - validStatusCodes: { - serializedName: "validStatusCodes", - xmlName: "validStatusCodes", - xmlElementName: "ArrayItemschema", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpHeader", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HttpHeader" + serializedName: + "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + type: { + name: "Composite", + className: "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + modelProperties: { + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + validStatusCodes: { + serializedName: "validStatusCodes", + xmlName: "validStatusCodes", + xmlElementName: "ArrayItemschema", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + headers: { + serializedName: "headers", + xmlName: "headers", + xmlElementName: "HttpHeader", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpHeader" + } + } + } } - } } - } } - } }; export const HttpHeader: coreClient.CompositeMapper = { - serializedName: "HttpHeader", - type: { - name: "Composite", - className: "HttpHeader", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "HttpHeader", + type: { + name: "Composite", + className: "HttpHeader", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const ConnectivityCheckResponse: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckResponse", - type: { - name: "Composite", - className: "ConnectivityCheckResponse", - modelProperties: { - hops: { - serializedName: "hops", - readOnly: true, - xmlName: "hops", - xmlElementName: "ConnectivityHop", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityHop" - } - } - } - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - xmlName: "connectionStatus", - type: { - name: "String" - } - }, - avgLatencyInMs: { - serializedName: "avgLatencyInMs", - readOnly: true, - xmlName: "avgLatencyInMs", - type: { - name: "Number" - } - }, - minLatencyInMs: { - serializedName: "minLatencyInMs", - readOnly: true, - xmlName: "minLatencyInMs", - type: { - name: "Number" - } - }, - maxLatencyInMs: { - serializedName: "maxLatencyInMs", - readOnly: true, - xmlName: "maxLatencyInMs", - type: { - name: "Number" - } - }, - probesSent: { - serializedName: "probesSent", - readOnly: true, - xmlName: "probesSent", - type: { - name: "Number" - } - }, - probesFailed: { - serializedName: "probesFailed", - readOnly: true, - xmlName: "probesFailed", - type: { - name: "Number" - } - } - } - } + serializedName: "ConnectivityCheckResponse", + type: { + name: "Composite", + className: "ConnectivityCheckResponse", + modelProperties: { + hops: { + serializedName: "hops", + readOnly: true, + xmlName: "hops", + xmlElementName: "ConnectivityHop", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityHop" + } + } + } + }, + connectionStatus: { + serializedName: "connectionStatus", + readOnly: true, + xmlName: "connectionStatus", + type: { + name: "String" + } + }, + avgLatencyInMs: { + serializedName: "avgLatencyInMs", + readOnly: true, + xmlName: "avgLatencyInMs", + type: { + name: "Number" + } + }, + minLatencyInMs: { + serializedName: "minLatencyInMs", + readOnly: true, + xmlName: "minLatencyInMs", + type: { + name: "Number" + } + }, + maxLatencyInMs: { + serializedName: "maxLatencyInMs", + readOnly: true, + xmlName: "maxLatencyInMs", + type: { + name: "Number" + } + }, + probesSent: { + serializedName: "probesSent", + readOnly: true, + xmlName: "probesSent", + type: { + name: "Number" + } + }, + probesFailed: { + serializedName: "probesFailed", + readOnly: true, + xmlName: "probesFailed", + type: { + name: "Number" + } + } + } + } }; export const ConnectivityHop: coreClient.CompositeMapper = { - serializedName: "ConnectivityHop", - type: { - name: "Composite", - className: "ConnectivityHop", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - address: { - serializedName: "address", - readOnly: true, - xmlName: "address", - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - xmlName: "resourceId", - type: { - name: "String" - } - }, - nextHopIds: { - serializedName: "nextHopIds", - readOnly: true, - xmlName: "nextHopIds", - xmlElementName: "ConnectivityHopNextHopIdsItem", - type: { - name: "Sequence", - element: { + serializedName: "ConnectivityHop", + type: { + name: "Composite", + className: "ConnectivityHop", + modelProperties: { type: { - name: "String" - } - } - } - }, - issues: { - serializedName: "issues", - readOnly: true, - xmlName: "issues", - xmlElementName: "ConnectivityIssue", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityIssue" + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + readOnly: true, + xmlName: "address", + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + xmlName: "resourceId", + type: { + name: "String" + } + }, + nextHopIds: { + serializedName: "nextHopIds", + readOnly: true, + xmlName: "nextHopIds", + xmlElementName: "ConnectivityHopNextHopIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + issues: { + serializedName: "issues", + readOnly: true, + xmlName: "issues", + xmlElementName: "ConnectivityIssue", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityIssue" + } + } + } } - } } - } } - } }; export const ConnectivityIssue: coreClient.CompositeMapper = { - serializedName: "ConnectivityIssue", - type: { - name: "Composite", - className: "ConnectivityIssue", - modelProperties: { - origin: { - serializedName: "origin", - readOnly: true, - xmlName: "origin", - type: { - name: "String" - } - }, - severity: { - serializedName: "severity", - readOnly: true, - xmlName: "severity", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - context: { - serializedName: "context", - readOnly: true, - xmlName: "context", - xmlElementName: "IssueContext", - type: { - name: "Sequence", - element: { + serializedName: "ConnectivityIssue", + type: { + name: "Composite", + className: "ConnectivityIssue", + modelProperties: { + origin: { + serializedName: "origin", + readOnly: true, + xmlName: "origin", + type: { + name: "String" + } + }, + severity: { + serializedName: "severity", + readOnly: true, + xmlName: "severity", + type: { + name: "String" + } + }, type: { - name: "Dictionary", - value: { type: { name: "String" } } + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + context: { + serializedName: "context", + readOnly: true, + xmlName: "context", + xmlElementName: "IssueContext", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } } - } } - } } - } }; export const ContentTypeCollection: coreClient.CompositeMapper = { - serializedName: "ContentTypeCollection", - type: { - name: "Composite", - className: "ContentTypeCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentTypeContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentTypeContract" + serializedName: "ContentTypeCollection", + type: { + name: "Composite", + className: "ContentTypeCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ContentTypeContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentTypeContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ContentItemCollection: coreClient.CompositeMapper = { - serializedName: "ContentItemCollection", - type: { - name: "Composite", - className: "ContentItemCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentItemContract" + serializedName: "ContentItemCollection", + type: { + name: "Composite", + className: "ContentItemCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "ContentItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentItemContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DeletedServicesCollection: coreClient.CompositeMapper = { - serializedName: "DeletedServicesCollection", - type: { - name: "Composite", - className: "DeletedServicesCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DeletedServiceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedServiceContract" + serializedName: "DeletedServicesCollection", + type: { + name: "Composite", + className: "DeletedServicesCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "DeletedServiceContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeletedServiceContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OperationListResult: coreClient.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "Operation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "Operation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const Operation: coreClient.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - xmlName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", - xmlName: "origin", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + xmlName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + xmlName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const OperationDisplay: coreClient.CompositeMapper = { - serializedName: "OperationDisplay", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - xmlName: "resource", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - } - } - } + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + xmlName: "provider", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + xmlName: "operation", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + xmlName: "resource", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + } + } + } }; export const ResourceSkuResults: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResults", - type: { - name: "Composite", - className: "ResourceSkuResults", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ResourceSkuResult", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuResult" + serializedName: "ResourceSkuResults", + type: { + name: "Composite", + className: "ResourceSkuResults", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ResourceSkuResult", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuResult" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceSkuResult: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResult", - type: { - name: "Composite", - className: "ResourceSkuResult", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ResourceSku" - } - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity" - } - } - } - } + serializedName: "ResourceSkuResult", + type: { + name: "Composite", + className: "ResourceSkuResult", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ResourceSku" + } + }, + capacity: { + serializedName: "capacity", + xmlName: "capacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity" + } + } + } + } }; export const ResourceSku: coreClient.CompositeMapper = { - serializedName: "ResourceSku", - type: { - name: "Composite", - className: "ResourceSku", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" + serializedName: "ResourceSku", + type: { + name: "Composite", + className: "ResourceSku", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + } } - } } - } }; export const ResourceSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ResourceSkuCapacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number" - } - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number" - } - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "String" - } - } - } - } + serializedName: "ResourceSkuCapacity", + type: { + name: "Composite", + className: "ResourceSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + readOnly: true, + xmlName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + xmlName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + readOnly: true, + xmlName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + readOnly: true, + xmlName: "scaleType", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceBackupRestoreParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceBackupRestoreParameters", - type: { - name: "Composite", - className: "ApiManagementServiceBackupRestoreParameters", - modelProperties: { - storageAccount: { - serializedName: "storageAccount", - required: true, - xmlName: "storageAccount", - type: { - name: "String" - } - }, - containerName: { - serializedName: "containerName", - required: true, - xmlName: "containerName", - type: { - name: "String" - } - }, - backupName: { - serializedName: "backupName", - required: true, - xmlName: "backupName", - type: { - name: "String" - } - }, - accessType: { - defaultValue: "AccessKey", - serializedName: "accessType", - xmlName: "accessType", - type: { - name: "String" - } - }, - accessKey: { - serializedName: "accessKey", - xmlName: "accessKey", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceBackupRestoreParameters", + type: { + name: "Composite", + className: "ApiManagementServiceBackupRestoreParameters", + modelProperties: { + storageAccount: { + serializedName: "storageAccount", + required: true, + xmlName: "storageAccount", + type: { + name: "String" + } + }, + containerName: { + serializedName: "containerName", + required: true, + xmlName: "containerName", + type: { + name: "String" + } + }, + backupName: { + serializedName: "backupName", + required: true, + xmlName: "backupName", + type: { + name: "String" + } + }, + accessType: { + defaultValue: "AccessKey", + serializedName: "accessType", + xmlName: "accessType", + type: { + name: "String" + } + }, + accessKey: { + serializedName: "accessKey", + xmlName: "accessKey", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceBaseProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceBaseProperties", - type: { - name: "Composite", - className: "ApiManagementServiceBaseProperties", - modelProperties: { - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "notificationSenderEmail", - xmlName: "notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "targetProvisioningState", - readOnly: true, - xmlName: "targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "createdAtUtc", - readOnly: true, - xmlName: "createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "gatewayUrl", - readOnly: true, - xmlName: "gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "portalUrl", - readOnly: true, - xmlName: "portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "managementApiUrl", - readOnly: true, - xmlName: "managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "scmUrl", - readOnly: true, - xmlName: "scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "developerPortalUrl", - readOnly: true, - xmlName: "developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "hostnameConfigurations", - xmlName: "hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", - xmlName: "publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "additionalLocations", - xmlName: "additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "customProperties", - xmlName: "customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "certificates", - xmlName: "certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "enableClientCertificate", - xmlName: "enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "virtualNetworkType", - xmlName: "virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "apiVersionConstraint", - xmlName: "apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "restore", - xmlName: "restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", - xmlName: "privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" + serializedName: "ApiManagementServiceBaseProperties", + type: { + name: "Composite", + className: "ApiManagementServiceBaseProperties", + modelProperties: { + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "notificationSenderEmail", + xmlName: "notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + xmlName: "provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "targetProvisioningState", + readOnly: true, + xmlName: "targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "createdAtUtc", + readOnly: true, + xmlName: "createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "gatewayUrl", + readOnly: true, + xmlName: "gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "gatewayRegionalUrl", + readOnly: true, + xmlName: "gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "portalUrl", + readOnly: true, + xmlName: "portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "managementApiUrl", + readOnly: true, + xmlName: "managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "scmUrl", + readOnly: true, + xmlName: "scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "developerPortalUrl", + readOnly: true, + xmlName: "developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "hostnameConfigurations", + xmlName: "hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "publicIPAddresses", + readOnly: true, + xmlName: "publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "privateIPAddresses", + readOnly: true, + xmlName: "privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "publicIpAddressId", + xmlName: "publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + xmlName: "publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "virtualNetworkConfiguration", + xmlName: "virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "additionalLocations", + xmlName: "additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "customProperties", + xmlName: "customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "certificates", + xmlName: "certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "enableClientCertificate", + xmlName: "enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "natGatewayState", + xmlName: "natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "outboundPublicIPAddresses", + readOnly: true, + xmlName: "outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "disableGateway", + xmlName: "disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "virtualNetworkType", + xmlName: "virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "apiVersionConstraint", + xmlName: "apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "restore", + xmlName: "restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + xmlName: "privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "platformVersion", + readOnly: true, + xmlName: "platformVersion", + type: { + name: "String" + } } - } } - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String" - } - } } - } }; export const HostnameConfiguration: coreClient.CompositeMapper = { - serializedName: "HostnameConfiguration", - type: { - name: "Composite", - className: "HostnameConfiguration", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - hostName: { - serializedName: "hostName", - required: true, - xmlName: "hostName", - type: { - name: "String" - } - }, - keyVaultId: { - serializedName: "keyVaultId", - xmlName: "keyVaultId", - type: { - name: "String" - } - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String" - } - }, - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String" - } - }, - defaultSslBinding: { - defaultValue: false, - serializedName: "defaultSslBinding", - xmlName: "defaultSslBinding", - type: { - name: "Boolean" - } - }, - negotiateClientCertificate: { - defaultValue: false, - serializedName: "negotiateClientCertificate", - xmlName: "negotiateClientCertificate", - type: { - name: "Boolean" - } - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation" - } - }, - certificateSource: { - serializedName: "certificateSource", - xmlName: "certificateSource", - type: { - name: "String" - } - }, - certificateStatus: { - serializedName: "certificateStatus", - xmlName: "certificateStatus", - type: { - name: "String" - } - } - } - } + serializedName: "HostnameConfiguration", + type: { + name: "Composite", + className: "HostnameConfiguration", + modelProperties: { + type: { + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + required: true, + xmlName: "hostName", + type: { + name: "String" + } + }, + keyVaultId: { + serializedName: "keyVaultId", + xmlName: "keyVaultId", + type: { + name: "String" + } + }, + identityClientId: { + serializedName: "identityClientId", + xmlName: "identityClientId", + type: { + name: "String" + } + }, + encodedCertificate: { + serializedName: "encodedCertificate", + xmlName: "encodedCertificate", + type: { + name: "String" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + xmlName: "certificatePassword", + type: { + name: "String" + } + }, + defaultSslBinding: { + defaultValue: false, + serializedName: "defaultSslBinding", + xmlName: "defaultSslBinding", + type: { + name: "Boolean" + } + }, + negotiateClientCertificate: { + defaultValue: false, + serializedName: "negotiateClientCertificate", + xmlName: "negotiateClientCertificate", + type: { + name: "Boolean" + } + }, + certificate: { + serializedName: "certificate", + xmlName: "certificate", + type: { + name: "Composite", + className: "CertificateInformation" + } + }, + certificateSource: { + serializedName: "certificateSource", + xmlName: "certificateSource", + type: { + name: "String" + } + }, + certificateStatus: { + serializedName: "certificateStatus", + xmlName: "certificateStatus", + type: { + name: "String" + } + } + } + } }; export const CertificateInformation: coreClient.CompositeMapper = { - serializedName: "CertificateInformation", - type: { - name: "Composite", - className: "CertificateInformation", - modelProperties: { - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime" - } - }, - thumbprint: { - serializedName: "thumbprint", - required: true, - xmlName: "thumbprint", - type: { - name: "String" - } - }, - subject: { - serializedName: "subject", - required: true, - xmlName: "subject", - type: { - name: "String" - } - } - } - } + serializedName: "CertificateInformation", + type: { + name: "Composite", + className: "CertificateInformation", + modelProperties: { + expiry: { + serializedName: "expiry", + required: true, + xmlName: "expiry", + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + required: true, + xmlName: "thumbprint", + type: { + name: "String" + } + }, + subject: { + serializedName: "subject", + required: true, + xmlName: "subject", + type: { + name: "String" + } + } + } + } }; export const VirtualNetworkConfiguration: coreClient.CompositeMapper = { - serializedName: "VirtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - modelProperties: { - vnetid: { - serializedName: "vnetid", - readOnly: true, - xmlName: "vnetid", - type: { - name: "String" - } - }, - subnetname: { - serializedName: "subnetname", - readOnly: true, - xmlName: "subnetname", - type: { - name: "String" - } - }, - subnetResourceId: { - constraints: { - Pattern: new RegExp( - "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" - ) - }, - serializedName: "subnetResourceId", - xmlName: "subnetResourceId", - type: { - name: "String" - } - } - } - } + serializedName: "VirtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration", + modelProperties: { + vnetid: { + serializedName: "vnetid", + readOnly: true, + xmlName: "vnetid", + type: { + name: "String" + } + }, + subnetname: { + serializedName: "subnetname", + readOnly: true, + xmlName: "subnetname", + type: { + name: "String" + } + }, + subnetResourceId: { + constraints: { + Pattern: new RegExp( + "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$" + ) + }, + serializedName: "subnetResourceId", + xmlName: "subnetResourceId", + type: { + name: "String" + } + } + } + } }; export const AdditionalLocation: coreClient.CompositeMapper = { - serializedName: "AdditionalLocation", - type: { - name: "Composite", - className: "AdditionalLocation", - modelProperties: { - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "AdditionalLocationZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: "AdditionalLocationPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: "AdditionalLocationPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String" - } - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: "AdditionalLocationOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AdditionalLocation", + type: { + name: "Composite", + className: "AdditionalLocation", + modelProperties: { + location: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "AdditionalLocationZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIPAddresses: { + serializedName: "publicIPAddresses", + readOnly: true, + xmlName: "publicIPAddresses", + xmlElementName: "AdditionalLocationPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "privateIPAddresses", + readOnly: true, + xmlName: "privateIPAddresses", + xmlElementName: "AdditionalLocationPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "publicIpAddressId", + xmlName: "publicIpAddressId", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "virtualNetworkConfiguration", + xmlName: "virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + gatewayRegionalUrl: { + serializedName: "gatewayRegionalUrl", + readOnly: true, + xmlName: "gatewayRegionalUrl", + type: { + name: "String" + } + }, + natGatewayState: { + serializedName: "natGatewayState", + xmlName: "natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "outboundPublicIPAddresses", + readOnly: true, + xmlName: "outboundPublicIPAddresses", + xmlElementName: "AdditionalLocationOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "disableGateway", + xmlName: "disableGateway", + type: { + name: "Boolean" + } + }, + platformVersion: { + serializedName: "platformVersion", + readOnly: true, + xmlName: "platformVersion", + type: { + name: "String" + } } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean" } - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String" - } - } } - } }; export const ApiManagementServiceSkuProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceSkuProperties", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - required: true, - xmlName: "capacity", - type: { - name: "Number" - } - } - } - } + serializedName: "ApiManagementServiceSkuProperties", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + required: true, + xmlName: "capacity", + type: { + name: "Number" + } + } + } + } }; export const CertificateConfiguration: coreClient.CompositeMapper = { - serializedName: "CertificateConfiguration", - type: { - name: "Composite", - className: "CertificateConfiguration", - modelProperties: { - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String" - } - }, - storeName: { - serializedName: "storeName", - required: true, - xmlName: "storeName", - type: { - name: "String" - } - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation" - } - } - } - } + serializedName: "CertificateConfiguration", + type: { + name: "Composite", + className: "CertificateConfiguration", + modelProperties: { + encodedCertificate: { + serializedName: "encodedCertificate", + xmlName: "encodedCertificate", + type: { + name: "String" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + xmlName: "certificatePassword", + type: { + name: "String" + } + }, + storeName: { + serializedName: "storeName", + required: true, + xmlName: "storeName", + type: { + name: "String" + } + }, + certificate: { + serializedName: "certificate", + xmlName: "certificate", + type: { + name: "Composite", + className: "CertificateInformation" + } + } + } + } }; export const ApiVersionConstraint: coreClient.CompositeMapper = { - serializedName: "ApiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - modelProperties: { - minApiVersion: { - serializedName: "minApiVersion", - xmlName: "minApiVersion", - type: { - name: "String" + serializedName: "ApiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint", + modelProperties: { + minApiVersion: { + serializedName: "minApiVersion", + xmlName: "minApiVersion", + type: { + name: "String" + } + } } - } } - } }; export const RemotePrivateEndpointConnectionWrapper: coreClient.CompositeMapper = { - serializedName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "ArmIdWrapper" - } - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - groupIds: { - serializedName: "properties.groupIds", - readOnly: true, - xmlName: "properties.groupIds", - xmlElementName: - "PrivateEndpointConnectionWrapperPropertiesGroupIdsItem", - type: { - name: "Sequence", - element: { + serializedName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, type: { - name: "String" + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + xmlName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "ArmIdWrapper" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + xmlName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + groupIds: { + serializedName: "properties.groupIds", + readOnly: true, + xmlName: "properties.groupIds", + xmlElementName: + "PrivateEndpointConnectionWrapperPropertiesGroupIdsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ArmIdWrapper: coreClient.CompositeMapper = { - serializedName: "ArmIdWrapper", - type: { - name: "Composite", - className: "ArmIdWrapper", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" + serializedName: "ArmIdWrapper", + type: { + name: "Composite", + className: "ArmIdWrapper", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - xmlName: "status", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - actionsRequired: { - serializedName: "actionsRequired", - xmlName: "actionsRequired", - type: { - name: "String" - } - } - } - } + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + xmlName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + xmlName: "actionsRequired", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceIdentity: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceIdentity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - readOnly: true, - xmlName: "principalId", - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - xmlName: "tenantId", - type: { - name: "Uuid" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - xmlName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } - } - } - } - } - } + serializedName: "ApiManagementServiceIdentity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity", + modelProperties: { + type: { + serializedName: "type", + required: true, + xmlName: "type", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + readOnly: true, + xmlName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + xmlName: "tenantId", + type: { + name: "Uuid" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + xmlName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserIdentityProperties" } + } + } + } + } + } }; export const UserIdentityProperties: coreClient.CompositeMapper = { - serializedName: "UserIdentityProperties", - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" + serializedName: "UserIdentityProperties", + type: { + name: "Composite", + className: "UserIdentityProperties", + modelProperties: { + principalId: { + serializedName: "principalId", + xmlName: "principalId", + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + } } - } } - } }; export const SystemData: coreClient.CompositeMapper = { - serializedName: "SystemData", - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - xmlName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - xmlName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - xmlName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - xmlName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - xmlName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - xmlName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } + serializedName: "SystemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + xmlName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + xmlName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + xmlName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + xmlName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + xmlName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + xmlName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } }; export const ApimResource: coreClient.CompositeMapper = { - serializedName: "ApimResource", - type: { - name: "Composite", - className: "ApimResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + serializedName: "ApimResource", + type: { + name: "Composite", + className: "ApimResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + xmlName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } }; export const ApiManagementServiceListResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceListResult", - type: { - name: "Composite", - className: "ApiManagementServiceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementServiceResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementServiceResource" + serializedName: "ApiManagementServiceListResult", + type: { + name: "Composite", + className: "ApiManagementServiceListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ApiManagementServiceResource", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementServiceResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ApiManagementServiceGetSsoTokenResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceGetSsoTokenResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetSsoTokenResult", - modelProperties: { - redirectUri: { - serializedName: "redirectUri", - xmlName: "redirectUri", - type: { - name: "String" + serializedName: "ApiManagementServiceGetSsoTokenResult", + type: { + name: "Composite", + className: "ApiManagementServiceGetSsoTokenResult", + modelProperties: { + redirectUri: { + serializedName: "redirectUri", + xmlName: "redirectUri", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceCheckNameAvailabilityParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceCheckNameAvailabilityParameters", - type: { - name: "Composite", - className: "ApiManagementServiceCheckNameAvailabilityParameters", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" + serializedName: "ApiManagementServiceCheckNameAvailabilityParameters", + type: { + name: "Composite", + className: "ApiManagementServiceCheckNameAvailabilityParameters", + modelProperties: { + name: { + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceNameAvailabilityResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceNameAvailabilityResult", - type: { - name: "Composite", - className: "ApiManagementServiceNameAvailabilityResult", - modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", - readOnly: true, - xmlName: "nameAvailable", - type: { - name: "Boolean" - } - }, - message: { - serializedName: "message", - readOnly: true, - xmlName: "message", - type: { - name: "String" - } - }, - reason: { - serializedName: "reason", - xmlName: "reason", - type: { - name: "Enum", - allowedValues: ["Valid", "Invalid", "AlreadyExists"] - } - } - } - } + serializedName: "ApiManagementServiceNameAvailabilityResult", + type: { + name: "Composite", + className: "ApiManagementServiceNameAvailabilityResult", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + readOnly: true, + xmlName: "nameAvailable", + type: { + name: "Boolean" + } + }, + message: { + serializedName: "message", + readOnly: true, + xmlName: "message", + type: { + name: "String" + } + }, + reason: { + serializedName: "reason", + xmlName: "reason", + type: { + name: "Enum", + allowedValues: ["Valid", "Invalid", "AlreadyExists"] + } + } + } + } }; export const ApiManagementServiceGetDomainOwnershipIdentifierResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - modelProperties: { - domainOwnershipIdentifier: { - serializedName: "domainOwnershipIdentifier", - readOnly: true, - xmlName: "domainOwnershipIdentifier", - type: { - name: "String" + serializedName: "ApiManagementServiceGetDomainOwnershipIdentifierResult", + type: { + name: "Composite", + className: "ApiManagementServiceGetDomainOwnershipIdentifierResult", + modelProperties: { + domainOwnershipIdentifier: { + serializedName: "domainOwnershipIdentifier", + readOnly: true, + xmlName: "domainOwnershipIdentifier", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceApplyNetworkConfigurationParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceApplyNetworkConfigurationParameters", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationParameters", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementServiceApplyNetworkConfigurationParameters", + type: { + name: "Composite", + className: "ApiManagementServiceApplyNetworkConfigurationParameters", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateCollection: coreClient.CompositeMapper = { - serializedName: "EmailTemplateCollection", - type: { - name: "Composite", - className: "EmailTemplateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "EmailTemplateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateContract" + serializedName: "EmailTemplateCollection", + type: { + name: "Composite", + className: "EmailTemplateCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "EmailTemplateContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const EmailTemplateParametersContractProperties: coreClient.CompositeMapper = { - serializedName: "EmailTemplateParametersContractProperties", - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties", - modelProperties: { - name: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - title: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - } - } - } + serializedName: "EmailTemplateParametersContractProperties", + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties", + modelProperties: { + name: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + title: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + } + } + } }; export const EmailTemplateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "EmailTemplateUpdateParameters", - type: { - name: "Composite", - className: "EmailTemplateUpdateParameters", - modelProperties: { - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - body: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties" + serializedName: "EmailTemplateUpdateParameters", + type: { + name: "Composite", + className: "EmailTemplateUpdateParameters", + modelProperties: { + subject: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + body: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.body", + xmlName: "properties.body", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + xmlElementName: "EmailTemplateParametersContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties" + } + } + } } - } } - } } - } }; export const GatewayCollection: coreClient.CompositeMapper = { - serializedName: "GatewayCollection", - type: { - name: "Composite", - className: "GatewayCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayContract" + serializedName: "GatewayCollection", + type: { + name: "Composite", + className: "GatewayCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceLocationDataContract: coreClient.CompositeMapper = { - serializedName: "ResourceLocationDataContract", - type: { - name: "Composite", - className: "ResourceLocationDataContract", - modelProperties: { - name: { - constraints: { - MaxLength: 256 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - city: { - constraints: { - MaxLength: 256 - }, - serializedName: "city", - xmlName: "city", - type: { - name: "String" - } - }, - district: { - constraints: { - MaxLength: 256 - }, - serializedName: "district", - xmlName: "district", - type: { - name: "String" - } - }, - countryOrRegion: { - constraints: { - MaxLength: 256 - }, - serializedName: "countryOrRegion", - xmlName: "countryOrRegion", - type: { - name: "String" - } - } - } - } + serializedName: "ResourceLocationDataContract", + type: { + name: "Composite", + className: "ResourceLocationDataContract", + modelProperties: { + name: { + constraints: { + MaxLength: 256 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + city: { + constraints: { + MaxLength: 256 + }, + serializedName: "city", + xmlName: "city", + type: { + name: "String" + } + }, + district: { + constraints: { + MaxLength: 256 + }, + serializedName: "district", + xmlName: "district", + type: { + name: "String" + } + }, + countryOrRegion: { + constraints: { + MaxLength: 256 + }, + serializedName: "countryOrRegion", + xmlName: "countryOrRegion", + type: { + name: "String" + } + } + } + } }; export const GatewayKeysContract: coreClient.CompositeMapper = { - serializedName: "GatewayKeysContract", - type: { - name: "Composite", - className: "GatewayKeysContract", - modelProperties: { - primary: { - serializedName: "primary", - xmlName: "primary", - type: { - name: "String" - } - }, - secondary: { - serializedName: "secondary", - xmlName: "secondary", - type: { - name: "String" + serializedName: "GatewayKeysContract", + type: { + name: "Composite", + className: "GatewayKeysContract", + modelProperties: { + primary: { + serializedName: "primary", + xmlName: "primary", + type: { + name: "String" + } + }, + secondary: { + serializedName: "secondary", + xmlName: "secondary", + type: { + name: "String" + } + } } - } } - } }; export const GatewayKeyRegenerationRequestContract: coreClient.CompositeMapper = { - serializedName: "GatewayKeyRegenerationRequestContract", - type: { - name: "Composite", - className: "GatewayKeyRegenerationRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] + serializedName: "GatewayKeyRegenerationRequestContract", + type: { + name: "Composite", + className: "GatewayKeyRegenerationRequestContract", + modelProperties: { + keyType: { + serializedName: "keyType", + required: true, + xmlName: "keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + } } - } } - } }; export const GatewayTokenRequestContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenRequestContract", - type: { - name: "Composite", - className: "GatewayTokenRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] - } - }, - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime" - } - } - } - } + serializedName: "GatewayTokenRequestContract", + type: { + name: "Composite", + className: "GatewayTokenRequestContract", + modelProperties: { + keyType: { + serializedName: "keyType", + required: true, + xmlName: "keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + }, + expiry: { + serializedName: "expiry", + required: true, + xmlName: "expiry", + type: { + name: "DateTime" + } + } + } + } }; export const GatewayTokenContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenContract", - type: { - name: "Composite", - className: "GatewayTokenContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "GatewayTokenContract", + type: { + name: "Composite", + className: "GatewayTokenContract", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationCollection: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfigurationCollection", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayHostnameConfigurationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract" + serializedName: "GatewayHostnameConfigurationCollection", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayHostnameConfigurationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayHostnameConfigurationContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const GatewayCertificateAuthorityCollection: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthorityCollection", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayCertificateAuthorityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract" + serializedName: "GatewayCertificateAuthorityCollection", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GatewayCertificateAuthorityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GatewayCertificateAuthorityContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const GroupCollection: coreClient.CompositeMapper = { - serializedName: "GroupCollection", - type: { - name: "Composite", - className: "GroupCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "GroupContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContract" + serializedName: "GroupCollection", + type: { + name: "Composite", + className: "GroupCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "GroupContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const GroupContractProperties: coreClient.CompositeMapper = { - serializedName: "GroupContractProperties", - type: { - name: "Composite", - className: "GroupContractProperties", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - builtIn: { - serializedName: "builtIn", - readOnly: true, - xmlName: "builtIn", - type: { - name: "Boolean" - } - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "externalId", - xmlName: "externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupContractProperties", + type: { + name: "Composite", + className: "GroupContractProperties", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + builtIn: { + serializedName: "builtIn", + readOnly: true, + xmlName: "builtIn", + type: { + name: "Boolean" + } + }, + type: { + serializedName: "type", + xmlName: "type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "externalId", + xmlName: "externalId", + type: { + name: "String" + } + } + } + } }; export const GroupCreateParameters: coreClient.CompositeMapper = { - serializedName: "GroupCreateParameters", - type: { - name: "Composite", - className: "GroupCreateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupCreateParameters", + type: { + name: "Composite", + className: "GroupCreateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const GroupUpdateParameters: coreClient.CompositeMapper = { - serializedName: "GroupUpdateParameters", - type: { - name: "Composite", - className: "GroupUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupUpdateParameters", + type: { + name: "Composite", + className: "GroupUpdateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const UserCollection: coreClient.CompositeMapper = { - serializedName: "UserCollection", - type: { - name: "Composite", - className: "UserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserContract" + serializedName: "UserCollection", + type: { + name: "Composite", + className: "UserCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "UserContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const UserEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "UserEntityBaseParameters", - type: { - name: "Composite", - className: "UserEntityBaseParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "state", - xmlName: "state", - type: { - name: "String" - } - }, - note: { - serializedName: "note", - xmlName: "note", - type: { - name: "String" - } - }, - identities: { - serializedName: "identities", - xmlName: "identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" + serializedName: "UserEntityBaseParameters", + type: { + name: "Composite", + className: "UserEntityBaseParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "state", + xmlName: "state", + type: { + name: "String" + } + }, + note: { + serializedName: "note", + xmlName: "note", + type: { + name: "String" + } + }, + identities: { + serializedName: "identities", + xmlName: "identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } } - } } - } } - } }; export const UserIdentityContract: coreClient.CompositeMapper = { - serializedName: "UserIdentityContract", - type: { - name: "Composite", - className: "UserIdentityContract", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" + serializedName: "UserIdentityContract", + type: { + name: "Composite", + className: "UserIdentityContract", + modelProperties: { + provider: { + serializedName: "provider", + xmlName: "provider", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderList: coreClient.CompositeMapper = { - serializedName: "IdentityProviderList", - type: { - name: "Composite", - className: "IdentityProviderList", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "IdentityProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentityProviderContract" + serializedName: "IdentityProviderList", + type: { + name: "Composite", + className: "IdentityProviderList", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "IdentityProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentityProviderContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const IdentityProviderBaseParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderBaseParameters", - type: { - name: "Composite", - className: "IdentityProviderBaseParameters", - modelProperties: { - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "signinTenant", - xmlName: "signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "allowedTenants", - xmlName: "allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { + serializedName: "IdentityProviderBaseParameters", + type: { + name: "Composite", + className: "IdentityProviderBaseParameters", + modelProperties: { type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "authority", - xmlName: "authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "signupPolicyName", - xmlName: "signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "signinPolicyName", - xmlName: "signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "profileEditingPolicyName", - xmlName: "profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "passwordResetPolicyName", - xmlName: "passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "clientLibrary", - xmlName: "clientLibrary", - type: { - name: "String" - } - } - } - } + serializedName: "type", + xmlName: "type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "signinTenant", + xmlName: "signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "allowedTenants", + xmlName: "allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "authority", + xmlName: "authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "signupPolicyName", + xmlName: "signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "signinPolicyName", + xmlName: "signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "profileEditingPolicyName", + xmlName: "profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "passwordResetPolicyName", + xmlName: "passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "clientLibrary", + xmlName: "clientLibrary", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderUpdateParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateParameters", - type: { - name: "Composite", - className: "IdentityProviderUpdateParameters", - modelProperties: { - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { + serializedName: "IdentityProviderUpdateParameters", + type: { + name: "Composite", + className: "IdentityProviderUpdateParameters", + modelProperties: { type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const ClientSecretContract: coreClient.CompositeMapper = { - serializedName: "ClientSecretContract", - type: { - name: "Composite", - className: "ClientSecretContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" + serializedName: "ClientSecretContract", + type: { + name: "Composite", + className: "ClientSecretContract", + modelProperties: { + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } } - } } - } }; export const LoggerCollection: coreClient.CompositeMapper = { - serializedName: "LoggerCollection", - type: { - name: "Composite", - className: "LoggerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "LoggerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoggerContract" + serializedName: "LoggerCollection", + type: { + name: "Composite", + className: "LoggerCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "LoggerContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LoggerContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const LoggerUpdateContract: coreClient.CompositeMapper = { - serializedName: "LoggerUpdateContract", - type: { - name: "Composite", - className: "LoggerUpdateContract", - modelProperties: { - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean" - } - } - } - } + serializedName: "LoggerUpdateContract", + type: { + name: "Composite", + className: "LoggerUpdateContract", + modelProperties: { + loggerType: { + serializedName: "properties.loggerType", + xmlName: "properties.loggerType", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + isBuffered: { + serializedName: "properties.isBuffered", + xmlName: "properties.isBuffered", + type: { + name: "Boolean" + } + } + } + } }; export const NamedValueCollection: coreClient.CompositeMapper = { - serializedName: "NamedValueCollection", - type: { - name: "Composite", - className: "NamedValueCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NamedValueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NamedValueContract" + serializedName: "NamedValueCollection", + type: { + name: "Composite", + className: "NamedValueCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "NamedValueContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NamedValueContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const NamedValueEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueEntityBaseParameters", - type: { - name: "Composite", - className: "NamedValueEntityBaseParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "tags", - xmlName: "tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "NamedValueEntityBaseParameters", + type: { + name: "Composite", + className: "NamedValueEntityBaseParameters", + modelProperties: { + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "tags", + xmlName: "tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "secret", + xmlName: "secret", + type: { + name: "Boolean" + } } - } - } - }, - secret: { - serializedName: "secret", - xmlName: "secret", - type: { - name: "Boolean" } - } } - } }; export const NamedValueUpdateParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameters", - type: { - name: "Composite", - className: "NamedValueUpdateParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueUpdateParameters", + type: { + name: "Composite", + className: "NamedValueUpdateParameters", + modelProperties: { + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NamedValueSecretContract: coreClient.CompositeMapper = { - serializedName: "NamedValueSecretContract", - type: { - name: "Composite", - className: "NamedValueSecretContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "NamedValueSecretContract", + type: { + name: "Composite", + className: "NamedValueSecretContract", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const NetworkStatusContractByLocation: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContractByLocation", - type: { - name: "Composite", - className: "NetworkStatusContractByLocation", - modelProperties: { - location: { - constraints: { - MinLength: 1 - }, - serializedName: "location", - xmlName: "location", - type: { - name: "String" - } - }, - networkStatus: { - serializedName: "networkStatus", - xmlName: "networkStatus", - type: { - name: "Composite", - className: "NetworkStatusContract" - } - } - } - } + serializedName: "NetworkStatusContractByLocation", + type: { + name: "Composite", + className: "NetworkStatusContractByLocation", + modelProperties: { + location: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + }, + networkStatus: { + serializedName: "networkStatus", + xmlName: "networkStatus", + type: { + name: "Composite", + className: "NetworkStatusContract" + } + } + } + } }; export const NetworkStatusContract: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContract", - type: { - name: "Composite", - className: "NetworkStatusContract", - modelProperties: { - dnsServers: { - serializedName: "dnsServers", - required: true, - xmlName: "dnsServers", - xmlElementName: "NetworkStatusContractDnsServersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - connectivityStatus: { - serializedName: "connectivityStatus", - required: true, - xmlName: "connectivityStatus", - xmlElementName: "ConnectivityStatusContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityStatusContract" + serializedName: "NetworkStatusContract", + type: { + name: "Composite", + className: "NetworkStatusContract", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", + required: true, + xmlName: "dnsServers", + xmlElementName: "NetworkStatusContractDnsServersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + connectivityStatus: { + serializedName: "connectivityStatus", + required: true, + xmlName: "connectivityStatus", + xmlElementName: "ConnectivityStatusContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectivityStatusContract" + } + } + } } - } } - } } - } }; export const ConnectivityStatusContract: coreClient.CompositeMapper = { - serializedName: "ConnectivityStatusContract", - type: { - name: "Composite", - className: "ConnectivityStatusContract", - modelProperties: { - name: { - constraints: { - MinLength: 1 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - required: true, - xmlName: "status", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - xmlName: "error", - type: { - name: "String" - } - }, - lastUpdated: { - serializedName: "lastUpdated", - required: true, - xmlName: "lastUpdated", - type: { - name: "DateTime" - } - }, - lastStatusChange: { - serializedName: "lastStatusChange", - required: true, - xmlName: "lastStatusChange", - type: { - name: "DateTime" - } - }, - resourceType: { - serializedName: "resourceType", - required: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - isOptional: { - serializedName: "isOptional", - required: true, - xmlName: "isOptional", - type: { - name: "Boolean" - } - } - } - } + serializedName: "ConnectivityStatusContract", + type: { + name: "Composite", + className: "ConnectivityStatusContract", + modelProperties: { + name: { + constraints: { + MinLength: 1 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + xmlName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + xmlName: "error", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + required: true, + xmlName: "lastUpdated", + type: { + name: "DateTime" + } + }, + lastStatusChange: { + serializedName: "lastStatusChange", + required: true, + xmlName: "lastStatusChange", + type: { + name: "DateTime" + } + }, + resourceType: { + serializedName: "resourceType", + required: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + isOptional: { + serializedName: "isOptional", + required: true, + xmlName: "isOptional", + type: { + name: "Boolean" + } + } + } + } }; export const NotificationCollection: coreClient.CompositeMapper = { - serializedName: "NotificationCollection", - type: { - name: "Composite", - className: "NotificationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NotificationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NotificationContract" + serializedName: "NotificationCollection", + type: { + name: "Composite", + className: "NotificationCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "NotificationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotificationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RecipientsContractProperties: coreClient.CompositeMapper = { - serializedName: "RecipientsContractProperties", - type: { - name: "Composite", - className: "RecipientsContractProperties", - modelProperties: { - emails: { - serializedName: "emails", - xmlName: "emails", - xmlElementName: "RecipientsContractPropertiesEmailsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - users: { - serializedName: "users", - xmlName: "users", - xmlElementName: "RecipientsContractPropertiesUsersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "RecipientsContractProperties", + type: { + name: "Composite", + className: "RecipientsContractProperties", + modelProperties: { + emails: { + serializedName: "emails", + xmlName: "emails", + xmlElementName: "RecipientsContractPropertiesEmailsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + users: { + serializedName: "users", + xmlName: "users", + xmlElementName: "RecipientsContractPropertiesUsersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const RecipientUserCollection: coreClient.CompositeMapper = { - serializedName: "RecipientUserCollection", - type: { - name: "Composite", - className: "RecipientUserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientUserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientUserContract" + serializedName: "RecipientUserCollection", + type: { + name: "Composite", + className: "RecipientUserCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RecipientUserContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecipientUserContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RecipientEmailCollection: coreClient.CompositeMapper = { - serializedName: "RecipientEmailCollection", - type: { - name: "Composite", - className: "RecipientEmailCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientEmailContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientEmailContract" + serializedName: "RecipientEmailCollection", + type: { + name: "Composite", + className: "RecipientEmailCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RecipientEmailContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecipientEmailContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OpenIdConnectProviderCollection: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProviderCollection", - type: { - name: "Composite", - className: "OpenIdConnectProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "OpenidConnectProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenidConnectProviderContract" + serializedName: "OpenIdConnectProviderCollection", + type: { + name: "Composite", + className: "OpenIdConnectProviderCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "OpenidConnectProviderContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenidConnectProviderContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const OpenidConnectProviderUpdateContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderUpdateContract", - type: { - name: "Composite", - className: "OpenidConnectProviderUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 50 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String" - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - } - } - } + serializedName: "OpenidConnectProviderUpdateContract", + type: { + name: "Composite", + className: "OpenidConnectProviderUpdateContract", + modelProperties: { + displayName: { + constraints: { + MaxLength: 50 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + metadataEndpoint: { + serializedName: "properties.metadataEndpoint", + xmlName: "properties.metadataEndpoint", + type: { + name: "String" + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + } + } + } }; export const OutboundEnvironmentEndpointList: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpointList", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpointList", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "OutboundEnvironmentEndpoint", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint" + serializedName: "OutboundEnvironmentEndpointList", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointList", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "OutboundEnvironmentEndpoint", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpoint", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint", - modelProperties: { - category: { - serializedName: "category", - xmlName: "category", - type: { - name: "String" - } - }, - endpoints: { - serializedName: "endpoints", - xmlName: "endpoints", - xmlElementName: "EndpointDependency", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDependency" + serializedName: "OutboundEnvironmentEndpoint", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + xmlName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + xmlName: "endpoints", + xmlElementName: "EndpointDependency", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } } - } } - } } - } }; export const EndpointDependency: coreClient.CompositeMapper = { - serializedName: "EndpointDependency", - type: { - name: "Composite", - className: "EndpointDependency", - modelProperties: { - domainName: { - serializedName: "domainName", - xmlName: "domainName", - type: { - name: "String" - } - }, - endpointDetails: { - serializedName: "endpointDetails", - xmlName: "endpointDetails", - xmlElementName: "EndpointDetail", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDetail" + serializedName: "EndpointDependency", + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + xmlName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + xmlName: "endpointDetails", + xmlElementName: "EndpointDetail", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } } - } } - } } - } }; export const EndpointDetail: coreClient.CompositeMapper = { - serializedName: "EndpointDetail", - type: { - name: "Composite", - className: "EndpointDetail", - modelProperties: { - port: { - serializedName: "port", - xmlName: "port", - type: { - name: "Number" - } - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String" + serializedName: "EndpointDetail", + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + port: { + serializedName: "port", + xmlName: "port", + type: { + name: "Number" + } + }, + region: { + serializedName: "region", + xmlName: "region", + type: { + name: "String" + } + } } - } } - } }; export const PolicyDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionCollection", - type: { - name: "Composite", - className: "PolicyDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyDescriptionContract" + serializedName: "PolicyDescriptionCollection", + type: { + name: "Composite", + className: "PolicyDescriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyDescriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyDescriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - } } - } }; export const PolicyFragmentCollection: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentCollection", - type: { - name: "Composite", - className: "PolicyFragmentCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyFragmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyFragmentContract" + serializedName: "PolicyFragmentCollection", + type: { + name: "Composite", + className: "PolicyFragmentCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PolicyFragmentContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyFragmentContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ResourceCollection: coreClient.CompositeMapper = { - serializedName: "ResourceCollection", - type: { - name: "Composite", - className: "ResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ResourceCollectionValueItem", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceCollectionValueItem" + serializedName: "ResourceCollection", + type: { + name: "Composite", + className: "ResourceCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ResourceCollectionValueItem", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceCollectionValueItem" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const PortalConfigCollection: coreClient.CompositeMapper = { - serializedName: "PortalConfigCollection", - type: { - name: "Composite", - className: "PortalConfigCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalConfigContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalConfigContract" + serializedName: "PortalConfigCollection", + type: { + name: "Composite", + className: "PortalConfigCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PortalConfigContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalConfigContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const PortalConfigPropertiesSignin: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin", - modelProperties: { - require: { - defaultValue: false, - serializedName: "require", - xmlName: "require", - type: { - name: "Boolean" + serializedName: "PortalConfigPropertiesSignin", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignin", + modelProperties: { + require: { + defaultValue: false, + serializedName: "require", + xmlName: "require", + type: { + name: "Boolean" + } + } } - } } - } }; export const PortalConfigPropertiesSignup: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup", - modelProperties: { - termsOfService: { - serializedName: "termsOfService", - xmlName: "termsOfService", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties" + serializedName: "PortalConfigPropertiesSignup", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignup", + modelProperties: { + termsOfService: { + serializedName: "termsOfService", + xmlName: "termsOfService", + type: { + name: "Composite", + className: "PortalConfigTermsOfServiceProperties" + } + } } - } } - } }; export const PortalConfigTermsOfServiceProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigTermsOfServiceProperties", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String" - } - }, - requireConsent: { - defaultValue: false, - serializedName: "requireConsent", - xmlName: "requireConsent", - type: { - name: "Boolean" - } - } - } - } + serializedName: "PortalConfigTermsOfServiceProperties", + type: { + name: "Composite", + className: "PortalConfigTermsOfServiceProperties", + modelProperties: { + text: { + serializedName: "text", + xmlName: "text", + type: { + name: "String" + } + }, + requireConsent: { + defaultValue: false, + serializedName: "requireConsent", + xmlName: "requireConsent", + type: { + name: "Boolean" + } + } + } + } }; export const PortalConfigDelegationProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigDelegationProperties", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties", - modelProperties: { - delegateRegistration: { - defaultValue: false, - serializedName: "delegateRegistration", - xmlName: "delegateRegistration", - type: { - name: "Boolean" - } - }, - delegateSubscription: { - defaultValue: false, - serializedName: "delegateSubscription", - xmlName: "delegateSubscription", - type: { - name: "Boolean" - } - }, - delegationUrl: { - serializedName: "delegationUrl", - xmlName: "delegationUrl", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String" - } - } - } - } + serializedName: "PortalConfigDelegationProperties", + type: { + name: "Composite", + className: "PortalConfigDelegationProperties", + modelProperties: { + delegateRegistration: { + defaultValue: false, + serializedName: "delegateRegistration", + xmlName: "delegateRegistration", + type: { + name: "Boolean" + } + }, + delegateSubscription: { + defaultValue: false, + serializedName: "delegateSubscription", + xmlName: "delegateSubscription", + type: { + name: "Boolean" + } + }, + delegationUrl: { + serializedName: "delegationUrl", + xmlName: "delegationUrl", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "validationKey", + xmlName: "validationKey", + type: { + name: "String" + } + } + } + } }; export const PortalConfigCorsProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCorsProperties", - type: { - name: "Composite", - className: "PortalConfigCorsProperties", - modelProperties: { - allowedOrigins: { - serializedName: "allowedOrigins", - xmlName: "allowedOrigins", - xmlElementName: "PortalConfigCorsPropertiesAllowedOriginsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PortalConfigCorsProperties", + type: { + name: "Composite", + className: "PortalConfigCorsProperties", + modelProperties: { + allowedOrigins: { + serializedName: "allowedOrigins", + xmlName: "allowedOrigins", + xmlElementName: "PortalConfigCorsPropertiesAllowedOriginsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const PortalConfigCspProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCspProperties", - type: { - name: "Composite", - className: "PortalConfigCspProperties", - modelProperties: { - mode: { - defaultValue: "disabled", - serializedName: "mode", - xmlName: "mode", - type: { - name: "String" - } - }, - reportUri: { - serializedName: "reportUri", - xmlName: "reportUri", - xmlElementName: "PortalConfigCspPropertiesReportUriItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - allowedSources: { - serializedName: "allowedSources", - xmlName: "allowedSources", - xmlElementName: "PortalConfigCspPropertiesAllowedSourcesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PortalConfigCspProperties", + type: { + name: "Composite", + className: "PortalConfigCspProperties", + modelProperties: { + mode: { + defaultValue: "disabled", + serializedName: "mode", + xmlName: "mode", + type: { + name: "String" + } + }, + reportUri: { + serializedName: "reportUri", + xmlName: "reportUri", + xmlElementName: "PortalConfigCspPropertiesReportUriItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allowedSources: { + serializedName: "allowedSources", + xmlName: "allowedSources", + xmlElementName: "PortalConfigCspPropertiesAllowedSourcesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const PortalRevisionCollection: coreClient.CompositeMapper = { - serializedName: "PortalRevisionCollection", - type: { - name: "Composite", - className: "PortalRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "PortalRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalRevisionContract" + serializedName: "PortalRevisionCollection", + type: { + name: "Composite", + className: "PortalRevisionCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "PortalRevisionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalRevisionContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const PortalSettingsCollection: coreClient.CompositeMapper = { - serializedName: "PortalSettingsCollection", - type: { - name: "Composite", - className: "PortalSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalSettingsContract" + serializedName: "PortalSettingsCollection", + type: { + name: "Composite", + className: "PortalSettingsCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PortalSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortalSettingsContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - } } - } }; export const SubscriptionsDelegationSettingsProperties: coreClient.CompositeMapper = { - serializedName: "SubscriptionsDelegationSettingsProperties", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" + serializedName: "SubscriptionsDelegationSettingsProperties", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const RegistrationDelegationSettingsProperties: coreClient.CompositeMapper = { - serializedName: "RegistrationDelegationSettingsProperties", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" + serializedName: "RegistrationDelegationSettingsProperties", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const TermsOfServiceProperties: coreClient.CompositeMapper = { - serializedName: "TermsOfServiceProperties", - type: { - name: "Composite", - className: "TermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" - } - }, - consentRequired: { - serializedName: "consentRequired", - xmlName: "consentRequired", - type: { - name: "Boolean" - } - } - } - } + serializedName: "TermsOfServiceProperties", + type: { + name: "Composite", + className: "TermsOfServiceProperties", + modelProperties: { + text: { + serializedName: "text", + xmlName: "text", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + }, + consentRequired: { + serializedName: "consentRequired", + xmlName: "consentRequired", + type: { + name: "Boolean" + } + } + } + } }; export const PortalSettingValidationKeyContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingValidationKeyContract", - type: { - name: "Composite", - className: "PortalSettingValidationKeyContract", - modelProperties: { - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String" + serializedName: "PortalSettingValidationKeyContract", + type: { + name: "Composite", + className: "PortalSettingValidationKeyContract", + modelProperties: { + validationKey: { + serializedName: "validationKey", + xmlName: "validationKey", + type: { + name: "String" + } + } } - } } - } }; export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionListResult", - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateEndpointConnection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PrivateEndpointConnection", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } } - } } - } } - } }; export const PrivateEndpoint: coreClient.CompositeMapper = { - serializedName: "PrivateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String" + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + xmlName: "id", + type: { + name: "String" + } + } } - } } - } }; export const PrivateEndpointConnectionRequest: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionRequest", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequest", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties" - } - } - } - } + serializedName: "PrivateEndpointConnectionRequest", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequest", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequestProperties" + } + } + } + } }; export const PrivateEndpointConnectionRequestProperties: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionRequestProperties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties", - modelProperties: { - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", - xmlName: "privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" + serializedName: "PrivateEndpointConnectionRequestProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequestProperties", + modelProperties: { + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + xmlName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } } - } } - } }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateLinkResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "PrivateLinkResource", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } } - } } - } } - } }; export const ProductUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ProductUpdateParameters", - type: { - name: "Composite", - className: "ProductUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductUpdateParameters", + type: { + name: "Composite", + className: "ProductUpdateParameters", + modelProperties: { + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + terms: { + serializedName: "properties.terms", + xmlName: "properties.terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "properties.approvalRequired", + xmlName: "properties.approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "properties.subscriptionsLimit", + xmlName: "properties.subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const SubscriptionCollection: coreClient.CompositeMapper = { - serializedName: "SubscriptionCollection", - type: { - name: "Composite", - className: "SubscriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "SubscriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubscriptionContract" + serializedName: "SubscriptionCollection", + type: { + name: "Composite", + className: "SubscriptionCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "SubscriptionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const QuotaCounterCollection: coreClient.CompositeMapper = { - serializedName: "QuotaCounterCollection", - type: { - name: "Composite", - className: "QuotaCounterCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "QuotaCounterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QuotaCounterContract" + serializedName: "QuotaCounterCollection", + type: { + name: "Composite", + className: "QuotaCounterCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "QuotaCounterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QuotaCounterContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const QuotaCounterContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterContract", - type: { - name: "Composite", - className: "QuotaCounterContract", - modelProperties: { - counterKey: { - constraints: { - MinLength: 1 - }, - serializedName: "counterKey", - required: true, - xmlName: "counterKey", - type: { - name: "String" - } - }, - periodKey: { - constraints: { - MinLength: 1 - }, - serializedName: "periodKey", - required: true, - xmlName: "periodKey", - type: { - name: "String" - } - }, - periodStartTime: { - serializedName: "periodStartTime", - required: true, - xmlName: "periodStartTime", - type: { - name: "DateTime" - } - }, - periodEndTime: { - serializedName: "periodEndTime", - required: true, - xmlName: "periodEndTime", - type: { - name: "DateTime" - } - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties" - } - } - } - } + serializedName: "QuotaCounterContract", + type: { + name: "Composite", + className: "QuotaCounterContract", + modelProperties: { + counterKey: { + constraints: { + MinLength: 1 + }, + serializedName: "counterKey", + required: true, + xmlName: "counterKey", + type: { + name: "String" + } + }, + periodKey: { + constraints: { + MinLength: 1 + }, + serializedName: "periodKey", + required: true, + xmlName: "periodKey", + type: { + name: "String" + } + }, + periodStartTime: { + serializedName: "periodStartTime", + required: true, + xmlName: "periodStartTime", + type: { + name: "DateTime" + } + }, + periodEndTime: { + serializedName: "periodEndTime", + required: true, + xmlName: "periodEndTime", + type: { + name: "DateTime" + } + }, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "Composite", + className: "QuotaCounterValueContractProperties" + } + } + } + } }; export const QuotaCounterValueContractProperties: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContractProperties", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties", - modelProperties: { - callsCount: { - serializedName: "callsCount", - xmlName: "callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "kbTransferred", - xmlName: "kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueContractProperties", + type: { + name: "Composite", + className: "QuotaCounterValueContractProperties", + modelProperties: { + callsCount: { + serializedName: "callsCount", + xmlName: "callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "kbTransferred", + xmlName: "kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const QuotaCounterValueUpdateContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueUpdateContract", - type: { - name: "Composite", - className: "QuotaCounterValueUpdateContract", - modelProperties: { - callsCount: { - serializedName: "properties.callsCount", - xmlName: "properties.callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "properties.kbTransferred", - xmlName: "properties.kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueUpdateContract", + type: { + name: "Composite", + className: "QuotaCounterValueUpdateContract", + modelProperties: { + callsCount: { + serializedName: "properties.callsCount", + xmlName: "properties.callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "properties.kbTransferred", + xmlName: "properties.kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const RegionListResult: coreClient.CompositeMapper = { - serializedName: "RegionListResult", - type: { - name: "Composite", - className: "RegionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RegionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegionContract" + serializedName: "RegionListResult", + type: { + name: "Composite", + className: "RegionListResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RegionContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const RegionContract: coreClient.CompositeMapper = { - serializedName: "RegionContract", - type: { - name: "Composite", - className: "RegionContract", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - isMasterRegion: { - serializedName: "isMasterRegion", - xmlName: "isMasterRegion", - type: { - name: "Boolean" - } - }, - isDeleted: { - serializedName: "isDeleted", - xmlName: "isDeleted", - type: { - name: "Boolean" - } - } - } - } + serializedName: "RegionContract", + type: { + name: "Composite", + className: "RegionContract", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + isMasterRegion: { + serializedName: "isMasterRegion", + xmlName: "isMasterRegion", + type: { + name: "Boolean" + } + }, + isDeleted: { + serializedName: "isDeleted", + xmlName: "isDeleted", + type: { + name: "Boolean" + } + } + } + } }; export const ReportCollection: coreClient.CompositeMapper = { - serializedName: "ReportCollection", - type: { - name: "Composite", - className: "ReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReportRecordContract" + serializedName: "ReportCollection", + type: { + name: "Composite", + className: "ReportCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "ReportRecordContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReportRecordContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const ReportRecordContract: coreClient.CompositeMapper = { - serializedName: "ReportRecordContract", - type: { - name: "Composite", - className: "ReportRecordContract", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime" - } - }, - interval: { - serializedName: "interval", - xmlName: "interval", - type: { - name: "String" - } - }, - country: { - serializedName: "country", - xmlName: "country", - type: { - name: "String" - } - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String" - } - }, - zip: { - serializedName: "zip", - xmlName: "zip", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String" - } - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String" - } - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String" - } - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String" - } - }, - callCountSuccess: { - serializedName: "callCountSuccess", - xmlName: "callCountSuccess", - type: { - name: "Number" - } - }, - callCountBlocked: { - serializedName: "callCountBlocked", - xmlName: "callCountBlocked", - type: { - name: "Number" - } - }, - callCountFailed: { - serializedName: "callCountFailed", - xmlName: "callCountFailed", - type: { - name: "Number" - } - }, - callCountOther: { - serializedName: "callCountOther", - xmlName: "callCountOther", - type: { - name: "Number" - } - }, - callCountTotal: { - serializedName: "callCountTotal", - xmlName: "callCountTotal", - type: { - name: "Number" - } - }, - bandwidth: { - serializedName: "bandwidth", - xmlName: "bandwidth", - type: { - name: "Number" - } - }, - cacheHitCount: { - serializedName: "cacheHitCount", - xmlName: "cacheHitCount", - type: { - name: "Number" - } - }, - cacheMissCount: { - serializedName: "cacheMissCount", - xmlName: "cacheMissCount", - type: { - name: "Number" - } - }, - apiTimeAvg: { - serializedName: "apiTimeAvg", - xmlName: "apiTimeAvg", - type: { - name: "Number" - } - }, - apiTimeMin: { - serializedName: "apiTimeMin", - xmlName: "apiTimeMin", - type: { - name: "Number" - } - }, - apiTimeMax: { - serializedName: "apiTimeMax", - xmlName: "apiTimeMax", - type: { - name: "Number" - } - }, - serviceTimeAvg: { - serializedName: "serviceTimeAvg", - xmlName: "serviceTimeAvg", - type: { - name: "Number" - } - }, - serviceTimeMin: { - serializedName: "serviceTimeMin", - xmlName: "serviceTimeMin", - type: { - name: "Number" - } - }, - serviceTimeMax: { - serializedName: "serviceTimeMax", - xmlName: "serviceTimeMax", - type: { - name: "Number" - } - } - } - } + serializedName: "ReportRecordContract", + type: { + name: "Composite", + className: "ReportRecordContract", + modelProperties: { + name: { + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + xmlName: "timestamp", + type: { + name: "DateTime" + } + }, + interval: { + serializedName: "interval", + xmlName: "interval", + type: { + name: "String" + } + }, + country: { + serializedName: "country", + xmlName: "country", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + xmlName: "region", + type: { + name: "String" + } + }, + zip: { + serializedName: "zip", + xmlName: "zip", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + readOnly: true, + xmlName: "userId", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + readOnly: true, + xmlName: "productId", + type: { + name: "String" + } + }, + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + }, + operationId: { + serializedName: "operationId", + xmlName: "operationId", + type: { + name: "String" + } + }, + apiRegion: { + serializedName: "apiRegion", + xmlName: "apiRegion", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + xmlName: "subscriptionId", + type: { + name: "String" + } + }, + callCountSuccess: { + serializedName: "callCountSuccess", + xmlName: "callCountSuccess", + type: { + name: "Number" + } + }, + callCountBlocked: { + serializedName: "callCountBlocked", + xmlName: "callCountBlocked", + type: { + name: "Number" + } + }, + callCountFailed: { + serializedName: "callCountFailed", + xmlName: "callCountFailed", + type: { + name: "Number" + } + }, + callCountOther: { + serializedName: "callCountOther", + xmlName: "callCountOther", + type: { + name: "Number" + } + }, + callCountTotal: { + serializedName: "callCountTotal", + xmlName: "callCountTotal", + type: { + name: "Number" + } + }, + bandwidth: { + serializedName: "bandwidth", + xmlName: "bandwidth", + type: { + name: "Number" + } + }, + cacheHitCount: { + serializedName: "cacheHitCount", + xmlName: "cacheHitCount", + type: { + name: "Number" + } + }, + cacheMissCount: { + serializedName: "cacheMissCount", + xmlName: "cacheMissCount", + type: { + name: "Number" + } + }, + apiTimeAvg: { + serializedName: "apiTimeAvg", + xmlName: "apiTimeAvg", + type: { + name: "Number" + } + }, + apiTimeMin: { + serializedName: "apiTimeMin", + xmlName: "apiTimeMin", + type: { + name: "Number" + } + }, + apiTimeMax: { + serializedName: "apiTimeMax", + xmlName: "apiTimeMax", + type: { + name: "Number" + } + }, + serviceTimeAvg: { + serializedName: "serviceTimeAvg", + xmlName: "serviceTimeAvg", + type: { + name: "Number" + } + }, + serviceTimeMin: { + serializedName: "serviceTimeMin", + xmlName: "serviceTimeMin", + type: { + name: "Number" + } + }, + serviceTimeMax: { + serializedName: "serviceTimeMax", + xmlName: "serviceTimeMax", + type: { + name: "Number" + } + } + } + } }; export const RequestReportCollection: coreClient.CompositeMapper = { - serializedName: "RequestReportCollection", - type: { - name: "Composite", - className: "RequestReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RequestReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequestReportRecordContract" + serializedName: "RequestReportCollection", + type: { + name: "Composite", + className: "RequestReportCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "RequestReportRecordContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RequestReportRecordContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - } } - } }; export const RequestReportRecordContract: coreClient.CompositeMapper = { - serializedName: "RequestReportRecordContract", - type: { - name: "Composite", - className: "RequestReportRecordContract", - modelProperties: { - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String" - } - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String" - } - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - ipAddress: { - serializedName: "ipAddress", - xmlName: "ipAddress", - type: { - name: "String" - } - }, - backendResponseCode: { - serializedName: "backendResponseCode", - xmlName: "backendResponseCode", - type: { - name: "String" - } - }, - responseCode: { - serializedName: "responseCode", - xmlName: "responseCode", - type: { - name: "Number" - } - }, - responseSize: { - serializedName: "responseSize", - xmlName: "responseSize", - type: { - name: "Number" - } - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime" - } - }, - cache: { - serializedName: "cache", - xmlName: "cache", - type: { - name: "String" - } - }, - apiTime: { - serializedName: "apiTime", - xmlName: "apiTime", - type: { - name: "Number" - } - }, - serviceTime: { - serializedName: "serviceTime", - xmlName: "serviceTime", - type: { - name: "Number" - } - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String" - } - }, - requestId: { - serializedName: "requestId", - xmlName: "requestId", - type: { - name: "String" - } - }, - requestSize: { - serializedName: "requestSize", - xmlName: "requestSize", - type: { - name: "Number" - } - } - } - } + serializedName: "RequestReportRecordContract", + type: { + name: "Composite", + className: "RequestReportRecordContract", + modelProperties: { + apiId: { + serializedName: "apiId", + xmlName: "apiId", + type: { + name: "String" + } + }, + operationId: { + serializedName: "operationId", + xmlName: "operationId", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + readOnly: true, + xmlName: "productId", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + readOnly: true, + xmlName: "userId", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + xmlName: "ipAddress", + type: { + name: "String" + } + }, + backendResponseCode: { + serializedName: "backendResponseCode", + xmlName: "backendResponseCode", + type: { + name: "String" + } + }, + responseCode: { + serializedName: "responseCode", + xmlName: "responseCode", + type: { + name: "Number" + } + }, + responseSize: { + serializedName: "responseSize", + xmlName: "responseSize", + type: { + name: "Number" + } + }, + timestamp: { + serializedName: "timestamp", + xmlName: "timestamp", + type: { + name: "DateTime" + } + }, + cache: { + serializedName: "cache", + xmlName: "cache", + type: { + name: "String" + } + }, + apiTime: { + serializedName: "apiTime", + xmlName: "apiTime", + type: { + name: "Number" + } + }, + serviceTime: { + serializedName: "serviceTime", + xmlName: "serviceTime", + type: { + name: "Number" + } + }, + apiRegion: { + serializedName: "apiRegion", + xmlName: "apiRegion", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + xmlName: "subscriptionId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + xmlName: "requestId", + type: { + name: "String" + } + }, + requestSize: { + serializedName: "requestSize", + xmlName: "requestSize", + type: { + name: "Number" + } + } + } + } }; export const GlobalSchemaCollection: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaCollection", - type: { - name: "Composite", - className: "GlobalSchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GlobalSchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GlobalSchemaContract" + serializedName: "GlobalSchemaCollection", + type: { + name: "Composite", + className: "GlobalSchemaCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "GlobalSchemaContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GlobalSchemaContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const TenantSettingsCollection: coreClient.CompositeMapper = { - serializedName: "TenantSettingsCollection", - type: { - name: "Composite", - className: "TenantSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "TenantSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TenantSettingsContract" + serializedName: "TenantSettingsCollection", + type: { + name: "Composite", + className: "TenantSettingsCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "TenantSettingsContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TenantSettingsContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiManagementSkusResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkusResult", - type: { - name: "Composite", - className: "ApiManagementSkusResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementSku", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSku" + serializedName: "ApiManagementSkusResult", + type: { + name: "Composite", + className: "ApiManagementSkusResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + xmlName: "value", + xmlElementName: "ApiManagementSku", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" } - } } - } }; export const ApiManagementSku: coreClient.CompositeMapper = { - serializedName: "ApiManagementSku", - type: { - name: "Composite", - className: "ApiManagementSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - readOnly: true, - xmlName: "tier", - type: { - name: "String" - } - }, - size: { - serializedName: "size", - readOnly: true, - xmlName: "size", - type: { - name: "String" - } - }, - family: { - serializedName: "family", - readOnly: true, - xmlName: "family", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - readOnly: true, - xmlName: "kind", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity" - } - }, - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - locationInfo: { - serializedName: "locationInfo", - readOnly: true, - xmlName: "locationInfo", - xmlElementName: "ApiManagementSkuLocationInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo" - } - } - } - }, - apiVersions: { - serializedName: "apiVersions", - readOnly: true, - xmlName: "apiVersions", - xmlElementName: "ApiManagementSkuApiVersionsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - costs: { - serializedName: "costs", - readOnly: true, - xmlName: "costs", - xmlElementName: "ApiManagementSkuCosts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCosts" - } - } - } - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities" - } - } - } - }, - restrictions: { - serializedName: "restrictions", - readOnly: true, - xmlName: "restrictions", - xmlElementName: "ApiManagementSkuRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions" + serializedName: "ApiManagementSku", + type: { + name: "Composite", + className: "ApiManagementSku", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + xmlName: "resourceType", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + readOnly: true, + xmlName: "tier", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + readOnly: true, + xmlName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + readOnly: true, + xmlName: "family", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + readOnly: true, + xmlName: "kind", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + xmlName: "capacity", + type: { + name: "Composite", + className: "ApiManagementSkuCapacity" + } + }, + locations: { + serializedName: "locations", + readOnly: true, + xmlName: "locations", + xmlElementName: "ApiManagementSkuLocationsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + readOnly: true, + xmlName: "locationInfo", + xmlElementName: "ApiManagementSkuLocationInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuLocationInfo" + } + } + } + }, + apiVersions: { + serializedName: "apiVersions", + readOnly: true, + xmlName: "apiVersions", + xmlElementName: "ApiManagementSkuApiVersionsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + costs: { + serializedName: "costs", + readOnly: true, + xmlName: "costs", + xmlElementName: "ApiManagementSkuCosts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCosts" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + xmlName: "capabilities", + xmlElementName: "ApiManagementSkuCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities" + } + } + } + }, + restrictions: { + serializedName: "restrictions", + readOnly: true, + xmlName: "restrictions", + xmlElementName: "ApiManagementSkuRestrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuRestrictions" + } + } + } } - } } - } } - } }; export const ApiManagementSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number" - } - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number" - } - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "Enum", - allowedValues: ["Automatic", "Manual", "None"] - } - } - } - } + serializedName: "ApiManagementSkuCapacity", + type: { + name: "Composite", + className: "ApiManagementSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + readOnly: true, + xmlName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + xmlName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + readOnly: true, + xmlName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + readOnly: true, + xmlName: "scaleType", + type: { + name: "Enum", + allowedValues: ["Automatic", "Manual", "None"] + } + } + } + } }; export const ApiManagementSkuLocationInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuLocationInfo", - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo", - modelProperties: { - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuLocationInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - zoneDetails: { - serializedName: "zoneDetails", - readOnly: true, - xmlName: "zoneDetails", - xmlElementName: "ApiManagementSkuZoneDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails" + serializedName: "ApiManagementSkuLocationInfo", + type: { + name: "Composite", + className: "ApiManagementSkuLocationInfo", + modelProperties: { + location: { + serializedName: "location", + readOnly: true, + xmlName: "location", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + readOnly: true, + xmlName: "zones", + xmlElementName: "ApiManagementSkuLocationInfoZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zoneDetails: { + serializedName: "zoneDetails", + readOnly: true, + xmlName: "zoneDetails", + xmlElementName: "ApiManagementSkuZoneDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuZoneDetails" + } + } + } } - } } - } } - } }; export const ApiManagementSkuZoneDetails: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuZoneDetails", - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - xmlElementName: "ApiManagementSkuZoneDetailsNameItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities" + serializedName: "ApiManagementSkuZoneDetails", + type: { + name: "Composite", + className: "ApiManagementSkuZoneDetails", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + xmlElementName: "ApiManagementSkuZoneDetailsNameItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + xmlName: "capabilities", + xmlElementName: "ApiManagementSkuCapabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities" + } + } + } } - } } - } } - } }; export const ApiManagementSkuCapabilities: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapabilities", - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementSkuCapabilities", + type: { + name: "Composite", + className: "ApiManagementSkuCapabilities", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + xmlName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + type: { + name: "String" + } + } + } + } }; export const ApiManagementSkuCosts: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCosts", - type: { - name: "Composite", - className: "ApiManagementSkuCosts", - modelProperties: { - meterID: { - serializedName: "meterID", - readOnly: true, - xmlName: "meterID", - type: { - name: "String" - } - }, - quantity: { - serializedName: "quantity", - readOnly: true, - xmlName: "quantity", - type: { - name: "Number" - } - }, - extendedUnit: { - serializedName: "extendedUnit", - readOnly: true, - xmlName: "extendedUnit", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementSkuCosts", + type: { + name: "Composite", + className: "ApiManagementSkuCosts", + modelProperties: { + meterID: { + serializedName: "meterID", + readOnly: true, + xmlName: "meterID", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + readOnly: true, + xmlName: "quantity", + type: { + name: "Number" + } + }, + extendedUnit: { + serializedName: "extendedUnit", + readOnly: true, + xmlName: "extendedUnit", + type: { + name: "String" + } + } + } + } }; export const ApiManagementSkuRestrictions: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictions", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["Location", "Zone"] - } - }, - values: { - serializedName: "values", - readOnly: true, - xmlName: "values", - xmlElementName: "ApiManagementSkuRestrictionsValuesItem", - type: { - name: "Sequence", - element: { + serializedName: "ApiManagementSkuRestrictions", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictions", + modelProperties: { type: { - name: "String" + serializedName: "type", + readOnly: true, + xmlName: "type", + type: { + name: "Enum", + allowedValues: ["Location", "Zone"] + } + }, + values: { + serializedName: "values", + readOnly: true, + xmlName: "values", + xmlElementName: "ApiManagementSkuRestrictionsValuesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + restrictionInfo: { + serializedName: "restrictionInfo", + xmlName: "restrictionInfo", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictionInfo" + } + }, + reasonCode: { + serializedName: "reasonCode", + readOnly: true, + xmlName: "reasonCode", + type: { + name: "Enum", + allowedValues: ["QuotaId", "NotAvailableForSubscription"] + } } - } - } - }, - restrictionInfo: { - serializedName: "restrictionInfo", - xmlName: "restrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo" - } - }, - reasonCode: { - serializedName: "reasonCode", - readOnly: true, - xmlName: "reasonCode", - type: { - name: "Enum", - allowedValues: ["QuotaId", "NotAvailableForSubscription"] } - } } - } }; export const ApiManagementSkuRestrictionInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo", - modelProperties: { - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuRestrictionInfoLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuRestrictionInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiManagementSkuRestrictionInfo", + type: { + name: "Composite", + className: "ApiManagementSkuRestrictionInfo", + modelProperties: { + locations: { + serializedName: "locations", + readOnly: true, + xmlName: "locations", + xmlElementName: "ApiManagementSkuRestrictionInfoLocationsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zones: { + serializedName: "zones", + readOnly: true, + xmlName: "zones", + xmlElementName: "ApiManagementSkuRestrictionInfoZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const SubscriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionCreateParameters", - type: { - name: "Composite", - className: "SubscriptionCreateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionCreateParameters", + type: { + name: "Composite", + className: "SubscriptionCreateParameters", + modelProperties: { + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const SubscriptionUpdateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionUpdateParameters", - type: { - name: "Composite", - className: "SubscriptionUpdateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - displayName: { - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String" - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionUpdateParameters", + type: { + name: "Composite", + className: "SubscriptionUpdateParameters", + modelProperties: { + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + displayName: { + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + stateComment: { + serializedName: "properties.stateComment", + xmlName: "properties.stateComment", + type: { + name: "String" + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const SubscriptionKeysContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionKeysContract", - type: { - name: "Composite", - className: "SubscriptionKeysContract", - modelProperties: { - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String" - } - } - } - } + serializedName: "SubscriptionKeysContract", + type: { + name: "Composite", + className: "SubscriptionKeysContract", + modelProperties: { + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "primaryKey", + xmlName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "secondaryKey", + xmlName: "secondaryKey", + type: { + name: "String" + } + } + } + } }; export const TagCreateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "TagCreateUpdateParameters", - type: { - name: "Composite", - className: "TagCreateUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagCreateUpdateParameters", + type: { + name: "Composite", + className: "TagCreateUpdateParameters", + modelProperties: { + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const AccessInformationCollection: coreClient.CompositeMapper = { - serializedName: "AccessInformationCollection", - type: { - name: "Composite", - className: "AccessInformationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "AccessInformationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccessInformationContract" + serializedName: "AccessInformationCollection", + type: { + name: "Composite", + className: "AccessInformationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "AccessInformationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessInformationContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } - } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const AccessInformationCreateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationCreateParameters", - type: { - name: "Composite", - className: "AccessInformationCreateParameters", - modelProperties: { - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String" - } - }, - primaryKey: { - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationCreateParameters", + type: { + name: "Composite", + className: "AccessInformationCreateParameters", + modelProperties: { + principalId: { + serializedName: "properties.principalId", + xmlName: "properties.principalId", + type: { + name: "String" + } + }, + primaryKey: { + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } }; export const AccessInformationUpdateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationUpdateParameters", - type: { - name: "Composite", - className: "AccessInformationUpdateParameters", - modelProperties: { - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" + serializedName: "AccessInformationUpdateParameters", + type: { + name: "Composite", + className: "AccessInformationUpdateParameters", + modelProperties: { + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const AccessInformationSecretsContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationSecretsContract", - type: { - name: "Composite", - className: "AccessInformationSecretsContract", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String" - } - }, - primaryKey: { - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationSecretsContract", + type: { + name: "Composite", + className: "AccessInformationSecretsContract", + modelProperties: { + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + xmlName: "principalId", + type: { + name: "String" + } + }, + primaryKey: { + serializedName: "primaryKey", + xmlName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + serializedName: "secondaryKey", + xmlName: "secondaryKey", + type: { + name: "String" + } + }, + enabled: { + serializedName: "enabled", + xmlName: "enabled", + type: { + name: "Boolean" + } + } + } + } }; export const DeployConfigurationParameters: coreClient.CompositeMapper = { - serializedName: "DeployConfigurationParameters", - type: { - name: "Composite", - className: "DeployConfigurationParameters", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean" + serializedName: "DeployConfigurationParameters", + type: { + name: "Composite", + className: "DeployConfigurationParameters", + modelProperties: { + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + force: { + serializedName: "properties.force", + xmlName: "properties.force", + type: { + name: "Boolean" + } + } } - } } - } }; export const OperationResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "OperationResultLogItemContract", - type: { - name: "Composite", - className: "OperationResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String" - } - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String" - } - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String" - } - } - } - } + serializedName: "OperationResultLogItemContract", + type: { + name: "Composite", + className: "OperationResultLogItemContract", + modelProperties: { + objectType: { + serializedName: "objectType", + xmlName: "objectType", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + xmlName: "action", + type: { + name: "String" + } + }, + objectKey: { + serializedName: "objectKey", + xmlName: "objectKey", + type: { + name: "String" + } + } + } + } }; export const SaveConfigurationParameter: coreClient.CompositeMapper = { - serializedName: "SaveConfigurationParameter", - type: { - name: "Composite", - className: "SaveConfigurationParameter", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean" + serializedName: "SaveConfigurationParameter", + type: { + name: "Composite", + className: "SaveConfigurationParameter", + modelProperties: { + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + force: { + serializedName: "properties.force", + xmlName: "properties.force", + type: { + name: "Boolean" + } + } } - } } - } }; export const UserCreateParameters: coreClient.CompositeMapper = { - serializedName: "UserCreateParameters", - type: { - name: "Composite", - className: "UserCreateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - appType: { - serializedName: "properties.appType", - xmlName: "properties.appType", - type: { - name: "String" - } - }, - confirmation: { - serializedName: "properties.confirmation", - xmlName: "properties.confirmation", - type: { - name: "String" - } - } - } - } + serializedName: "UserCreateParameters", + type: { + name: "Composite", + className: "UserCreateParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + appType: { + serializedName: "properties.appType", + xmlName: "properties.appType", + type: { + name: "String" + } + }, + confirmation: { + serializedName: "properties.confirmation", + xmlName: "properties.confirmation", + type: { + name: "String" + } + } + } + } }; export const UserUpdateParameters: coreClient.CompositeMapper = { - serializedName: "UserUpdateParameters", - type: { - name: "Composite", - className: "UserUpdateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - } - } - } + serializedName: "UserUpdateParameters", + type: { + name: "Composite", + className: "UserUpdateParameters", + modelProperties: { + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + xmlName: "properties.password", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + } + } + } }; export const GenerateSsoUrlResult: coreClient.CompositeMapper = { - serializedName: "GenerateSsoUrlResult", - type: { - name: "Composite", - className: "GenerateSsoUrlResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "GenerateSsoUrlResult", + type: { + name: "Composite", + className: "GenerateSsoUrlResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const UserIdentityCollection: coreClient.CompositeMapper = { - serializedName: "UserIdentityCollection", - type: { - name: "Composite", - className: "UserIdentityCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" + serializedName: "UserIdentityCollection", + type: { + name: "Composite", + className: "UserIdentityCollection", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + count: { + serializedName: "count", + xmlName: "count", + type: { + name: "Number" + } + }, + nextLink: { + serializedName: "nextLink", + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number" - } - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const UserTokenParameters: coreClient.CompositeMapper = { - serializedName: "UserTokenParameters", - type: { - name: "Composite", - className: "UserTokenParameters", - modelProperties: { - keyType: { - serializedName: "properties.keyType", - xmlName: "properties.keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"] - } - }, - expiry: { - serializedName: "properties.expiry", - xmlName: "properties.expiry", - type: { - name: "DateTime" - } - } - } - } + serializedName: "UserTokenParameters", + type: { + name: "Composite", + className: "UserTokenParameters", + modelProperties: { + keyType: { + serializedName: "properties.keyType", + xmlName: "properties.keyType", + type: { + name: "Enum", + allowedValues: ["primary", "secondary"] + } + }, + expiry: { + serializedName: "properties.expiry", + xmlName: "properties.expiry", + type: { + name: "DateTime" + } + } + } + } }; export const UserTokenResult: coreClient.CompositeMapper = { - serializedName: "UserTokenResult", - type: { - name: "Composite", - className: "UserTokenResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" + serializedName: "UserTokenResult", + type: { + name: "Composite", + className: "UserTokenResult", + modelProperties: { + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationCollection: coreClient.CompositeMapper = { - serializedName: "DocumentationCollection", - type: { - name: "Composite", - className: "DocumentationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DocumentationContract" + serializedName: "DocumentationCollection", + type: { + name: "Composite", + className: "DocumentationCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + xmlName: "value", + xmlElementName: "DocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DocumentationContract" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + xmlName: "nextLink", + type: { + name: "String" + } } - } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String" - } - } } - } }; export const DocumentationUpdateContract: coreClient.CompositeMapper = { - serializedName: "DocumentationUpdateContract", - type: { - name: "Composite", - className: "DocumentationUpdateContract", - modelProperties: { - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" + serializedName: "DocumentationUpdateContract", + type: { + name: "Composite", + className: "DocumentationUpdateContract", + modelProperties: { + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } } - } } - } }; export const ApiRevisionInfoContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionInfoContract", - type: { - name: "Composite", - className: "ApiRevisionInfoContract", - modelProperties: { - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String" - } - }, - apiVersionName: { - constraints: { - MaxLength: 100 - }, - serializedName: "apiVersionName", - xmlName: "apiVersionName", - type: { - name: "String" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } - } - } + serializedName: "ApiRevisionInfoContract", + type: { + name: "Composite", + className: "ApiRevisionInfoContract", + modelProperties: { + sourceApiId: { + serializedName: "sourceApiId", + xmlName: "sourceApiId", + type: { + name: "String" + } + }, + apiVersionName: { + constraints: { + MaxLength: 100 + }, + serializedName: "apiVersionName", + xmlName: "apiVersionName", + type: { + name: "String" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "apiRevisionDescription", + xmlName: "apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionSet: { + serializedName: "apiVersionSet", + xmlName: "apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } + } + } + } }; export const QuotaCounterValueContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContract", - type: { - name: "Composite", - className: "QuotaCounterValueContract", - modelProperties: { - callsCount: { - serializedName: "value.callsCount", - xmlName: "value.callsCount", - type: { - name: "Number" - } - }, - kbTransferred: { - serializedName: "value.kbTransferred", - xmlName: "value.kbTransferred", - type: { - name: "Number" + serializedName: "QuotaCounterValueContract", + type: { + name: "Composite", + className: "QuotaCounterValueContract", + modelProperties: { + callsCount: { + serializedName: "value.callsCount", + xmlName: "value.callsCount", + type: { + name: "Number" + } + }, + kbTransferred: { + serializedName: "value.kbTransferred", + xmlName: "value.kbTransferred", + type: { + name: "Number" + } + } } - } } - } }; export const ResolverResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultLogItemContract", - type: { - name: "Composite", - className: "ResolverResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String" - } - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String" - } - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverResultLogItemContract", + type: { + name: "Composite", + className: "ResolverResultLogItemContract", + modelProperties: { + objectType: { + serializedName: "objectType", + xmlName: "objectType", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + xmlName: "action", + type: { + name: "String" + } + }, + objectKey: { + serializedName: "objectKey", + xmlName: "objectKey", + type: { + name: "String" + } + } + } + } }; export const ApiContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractProperties", - type: { - name: "Composite", - className: "ApiContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - required: true, - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContractProperties", + type: { + name: "Composite", + className: "ApiContractProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + sourceApiId: { + serializedName: "sourceApiId", + xmlName: "sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + required: true, + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "apiVersionSet", + xmlName: "apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } } - } } - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } } - } }; export const ApiContractUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractUpdateProperties", - type: { - name: "Composite", - className: "ApiContractUpdateProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContractUpdateProperties", + type: { + name: "Composite", + className: "ApiContractUpdateProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ApiTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiTagResourceContractProperties", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiTagResourceContractProperties", + type: { + name: "Composite", + className: "ApiTagResourceContractProperties", + modelProperties: { + ...ApiEntityBaseContract.type.modelProperties, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "name", + xmlName: "name", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "serviceUrl", + xmlName: "serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "path", + xmlName: "path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "protocols", + xmlName: "protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const ProxyResource: coreClient.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } } - } }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnection", - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...Resource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint" - } - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + xmlName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + xmlName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } }; export const PrivateLinkResource: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...Resource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - xmlName: "properties.groupId", - type: { - name: "String" - } - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - xmlName: "properties.requiredMembers", - xmlElementName: "PrivateLinkResourcePropertiesRequiredMembersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - xmlName: "properties.requiredZoneNames", - xmlElementName: "PrivateLinkResourcePropertiesRequiredZoneNamesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + xmlName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, + xmlName: "properties.requiredMembers", + xmlElementName: "PrivateLinkResourcePropertiesRequiredMembersItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + xmlName: "properties.requiredZoneNames", + xmlElementName: "PrivateLinkResourcePropertiesRequiredZoneNamesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } - } } - } } - } }; export const OperationContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationContractProperties", - type: { - name: "Composite", - className: "OperationContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - required: true, - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "urlTemplate", - required: true, - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationContractProperties", + type: { + name: "Composite", + className: "OperationContractProperties", + modelProperties: { + ...OperationEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + required: true, + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "urlTemplate", + required: true, + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const OperationUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContractProperties", - type: { - name: "Composite", - className: "OperationUpdateContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "urlTemplate", - xmlName: "urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationUpdateContractProperties", + type: { + name: "Composite", + className: "OperationUpdateContractProperties", + modelProperties: { + ...OperationEntityBaseContract.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + xmlName: "method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "urlTemplate", + xmlName: "urlTemplate", + type: { + name: "String" + } + } + } + } }; export const ProductContractProperties: coreClient.CompositeMapper = { - serializedName: "ProductContractProperties", - type: { - name: "Composite", - className: "ProductContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductContractProperties", + type: { + name: "Composite", + className: "ProductContractProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const ProductTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "ProductTagResourceContractProperties", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String" - } - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String" - } - } - } - } + serializedName: "ProductTagResourceContractProperties", + type: { + name: "Composite", + className: "ProductTagResourceContractProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + id: { + serializedName: "id", + xmlName: "id", + type: { + name: "String" + } + }, + name: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String" + } + } + } + } }; export const ProductUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ProductUpdateProperties", - type: { - name: "Composite", - className: "ProductUpdateProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductUpdateProperties", + type: { + name: "Composite", + className: "ProductUpdateProperties", + modelProperties: { + ...ProductEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const IssueContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractProperties", - type: { - name: "Composite", - className: "IssueContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - required: true, - xmlName: "title", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - required: true, - xmlName: "description", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContractProperties", + type: { + name: "Composite", + className: "IssueContractProperties", + modelProperties: { + ...IssueContractBaseProperties.type.modelProperties, + title: { + serializedName: "title", + required: true, + xmlName: "title", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + xmlName: "description", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + required: true, + xmlName: "userId", + type: { + name: "String" + } + } + } + } }; export const IssueUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContractProperties", - type: { - name: "Composite", - className: "IssueUpdateContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - xmlName: "title", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String" - } - }, - userId: { - serializedName: "userId", - xmlName: "userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueUpdateContractProperties", + type: { + name: "Composite", + className: "IssueUpdateContractProperties", + modelProperties: { + ...IssueContractBaseProperties.type.modelProperties, + title: { + serializedName: "title", + xmlName: "title", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + xmlName: "description", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + xmlName: "userId", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionContractProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContractProperties", - type: { - name: "Composite", - className: "TagDescriptionContractProperties", - modelProperties: { - ...TagDescriptionBaseProperties.type.modelProperties, - tagId: { - serializedName: "tagId", - xmlName: "tagId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionContractProperties", + type: { + name: "Composite", + className: "TagDescriptionContractProperties", + modelProperties: { + ...TagDescriptionBaseProperties.type.modelProperties, + tagId: { + serializedName: "tagId", + xmlName: "tagId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractProperties", - type: { - name: "Composite", - className: "ApiVersionSetContractProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - required: true, - xmlName: "versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContractProperties", + type: { + name: "Composite", + className: "ApiVersionSetContractProperties", + modelProperties: { + ...ApiVersionSetEntityBase.type.modelProperties, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + required: true, + xmlName: "versioningScheme", + type: { + name: "String" + } + } + } + } }; export const ApiVersionSetUpdateParametersProperties: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetUpdateParametersProperties", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParametersProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetUpdateParametersProperties", + type: { + name: "Composite", + className: "ApiVersionSetUpdateParametersProperties", + modelProperties: { + ...ApiVersionSetEntityBase.type.modelProperties, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "versioningScheme", + xmlName: "versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerContractProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - required: true, - xmlName: "clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - required: true, - xmlName: "authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - required: true, - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContractProperties", + type: { + name: "Composite", + className: "AuthorizationServerContractProperties", + modelProperties: { + ...AuthorizationServerContractBaseProperties.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "useInTestConsole", + xmlName: "useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "useInApiDocumentation", + xmlName: "useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "clientRegistrationEndpoint", + required: true, + xmlName: "clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "authorizationEndpoint", + required: true, + xmlName: "authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + required: true, + xmlName: "grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationServerUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerUpdateContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - xmlName: "clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - xmlName: "authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerUpdateContractProperties", + type: { + name: "Composite", + className: "AuthorizationServerUpdateContractProperties", + modelProperties: { + ...AuthorizationServerContractBaseProperties.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "useInTestConsole", + xmlName: "useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "useInApiDocumentation", + xmlName: "useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "clientRegistrationEndpoint", + xmlName: "clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "authorizationEndpoint", + xmlName: "authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "grantTypes", + xmlName: "grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } } - } } - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } } - } }; export const BackendContractProperties: coreClient.CompositeMapper = { - serializedName: "BackendContractProperties", - type: { - name: "Composite", - className: "BackendContractProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - required: true, - xmlName: "protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendContractProperties", + type: { + name: "Composite", + className: "BackendContractProperties", + modelProperties: { + ...BackendBaseParameters.type.modelProperties, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + required: true, + xmlName: "protocol", + type: { + name: "String" + } + } + } + } }; export const BackendUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameterProperties", - type: { - name: "Composite", - className: "BackendUpdateParameterProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "url", - xmlName: "url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendUpdateParameterProperties", + type: { + name: "Composite", + className: "BackendUpdateParameterProperties", + modelProperties: { + ...BackendBaseParameters.type.modelProperties, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "url", + xmlName: "url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + xmlName: "protocol", + type: { + name: "String" + } + } + } + } }; export const KeyVaultContractProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractProperties", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - modelProperties: { - ...KeyVaultContractCreateProperties.type.modelProperties, - lastStatus: { - serializedName: "lastStatus", - xmlName: "lastStatus", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties" + serializedName: "KeyVaultContractProperties", + type: { + name: "Composite", + className: "KeyVaultContractProperties", + modelProperties: { + ...KeyVaultContractCreateProperties.type.modelProperties, + lastStatus: { + serializedName: "lastStatus", + xmlName: "lastStatus", + type: { + name: "Composite", + className: "KeyVaultLastAccessStatusContractProperties" + } + } } - } } - } }; export const ApiManagementServiceProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceProperties", - type: { - name: "Composite", - className: "ApiManagementServiceProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherEmail", - required: true, - xmlName: "publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherName", - required: true, - xmlName: "publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceProperties", + type: { + name: "Composite", + className: "ApiManagementServiceProperties", + modelProperties: { + ...ApiManagementServiceBaseProperties.type.modelProperties, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherEmail", + required: true, + xmlName: "publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherName", + required: true, + xmlName: "publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceUpdateProperties", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherEmail", - xmlName: "publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "publisherName", - xmlName: "publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceUpdateProperties", + type: { + name: "Composite", + className: "ApiManagementServiceUpdateProperties", + modelProperties: { + ...ApiManagementServiceBaseProperties.type.modelProperties, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherEmail", + xmlName: "publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "publisherName", + xmlName: "publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceResource: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceResource", - type: { - name: "Composite", - className: "ApiManagementServiceResource", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity" - } - }, - systemData: { - serializedName: "systemData", - xmlName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceResourceZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" - } - } - } - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String" - } - }, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherEmail", - required: true, - xmlName: "properties.publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherName", - required: true, - xmlName: "properties.publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceResource", + type: { + name: "Composite", + className: "ApiManagementServiceResource", + modelProperties: { + ...ApimResource.type.modelProperties, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + identity: { + serializedName: "identity", + xmlName: "identity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity" + } + }, + systemData: { + serializedName: "systemData", + xmlName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + location: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + xmlName: "etag", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "ApiManagementServiceResourceZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.notificationSenderEmail", + xmlName: "properties.notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "properties.targetProvisioningState", + readOnly: true, + xmlName: "properties.targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "properties.createdAtUtc", + readOnly: true, + xmlName: "properties.createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "properties.gatewayUrl", + readOnly: true, + xmlName: "properties.gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "properties.gatewayRegionalUrl", + readOnly: true, + xmlName: "properties.gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "properties.portalUrl", + readOnly: true, + xmlName: "properties.portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "properties.managementApiUrl", + readOnly: true, + xmlName: "properties.managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "properties.scmUrl", + readOnly: true, + xmlName: "properties.scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "properties.developerPortalUrl", + readOnly: true, + xmlName: "properties.developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "properties.hostnameConfigurations", + xmlName: "properties.hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "properties.publicIPAddresses", + readOnly: true, + xmlName: "properties.publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "properties.privateIPAddresses", + readOnly: true, + xmlName: "properties.privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "properties.publicIpAddressId", + xmlName: "properties.publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + xmlName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "properties.virtualNetworkConfiguration", + xmlName: "properties.virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "properties.additionalLocations", + xmlName: "properties.additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "properties.customProperties", + xmlName: "properties.customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "properties.certificates", + xmlName: "properties.certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "properties.enableClientCertificate", + xmlName: "properties.enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "properties.natGatewayState", + xmlName: "properties.natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "properties.outboundPublicIPAddresses", + readOnly: true, + xmlName: "properties.outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "properties.disableGateway", + xmlName: "properties.disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "properties.virtualNetworkType", + xmlName: "properties.virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "properties.apiVersionConstraint", + xmlName: "properties.apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "properties.restore", + xmlName: "properties.restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + xmlName: "properties.privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "properties.platformVersion", + readOnly: true, + xmlName: "properties.platformVersion", + type: { + name: "String" + } + }, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherEmail", + required: true, + xmlName: "properties.publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherName", + required: true, + xmlName: "properties.publisherName", + type: { + name: "String" + } + } + } + } }; export const ApiManagementServiceUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceUpdateParameters", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateParameters", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties" - } - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String" - } - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceUpdateParametersZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String" - } - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String" - } - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime" - } - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String" - } - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String" - } - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String" - } - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String" - } - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String" - } - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String" - } - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration" - } - } - } - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String" - } - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration" - } - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation" - } - } - } - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration" - } - } - } - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean" - } - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String" - } - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean" - } - }, - virtualNetworkType: { - defaultValue: "None", - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String" - } - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint" - } - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean" - } - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper" - } - } - } - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String" - } - }, - publisherEmail: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherEmail", - xmlName: "properties.publisherEmail", - type: { - name: "String" - } - }, - publisherName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.publisherName", - xmlName: "properties.publisherName", - type: { - name: "String" - } - } - } - } + serializedName: "ApiManagementServiceUpdateParameters", + type: { + name: "Composite", + className: "ApiManagementServiceUpdateParameters", + modelProperties: { + ...ApimResource.type.modelProperties, + sku: { + serializedName: "sku", + xmlName: "sku", + type: { + name: "Composite", + className: "ApiManagementServiceSkuProperties" + } + }, + identity: { + serializedName: "identity", + xmlName: "identity", + type: { + name: "Composite", + className: "ApiManagementServiceIdentity" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + xmlName: "etag", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + xmlName: "zones", + xmlElementName: "ApiManagementServiceUpdateParametersZonesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notificationSenderEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.notificationSenderEmail", + xmlName: "properties.notificationSenderEmail", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + xmlName: "properties.provisioningState", + type: { + name: "String" + } + }, + targetProvisioningState: { + serializedName: "properties.targetProvisioningState", + readOnly: true, + xmlName: "properties.targetProvisioningState", + type: { + name: "String" + } + }, + createdAtUtc: { + serializedName: "properties.createdAtUtc", + readOnly: true, + xmlName: "properties.createdAtUtc", + type: { + name: "DateTime" + } + }, + gatewayUrl: { + serializedName: "properties.gatewayUrl", + readOnly: true, + xmlName: "properties.gatewayUrl", + type: { + name: "String" + } + }, + gatewayRegionalUrl: { + serializedName: "properties.gatewayRegionalUrl", + readOnly: true, + xmlName: "properties.gatewayRegionalUrl", + type: { + name: "String" + } + }, + portalUrl: { + serializedName: "properties.portalUrl", + readOnly: true, + xmlName: "properties.portalUrl", + type: { + name: "String" + } + }, + managementApiUrl: { + serializedName: "properties.managementApiUrl", + readOnly: true, + xmlName: "properties.managementApiUrl", + type: { + name: "String" + } + }, + scmUrl: { + serializedName: "properties.scmUrl", + readOnly: true, + xmlName: "properties.scmUrl", + type: { + name: "String" + } + }, + developerPortalUrl: { + serializedName: "properties.developerPortalUrl", + readOnly: true, + xmlName: "properties.developerPortalUrl", + type: { + name: "String" + } + }, + hostnameConfigurations: { + serializedName: "properties.hostnameConfigurations", + xmlName: "properties.hostnameConfigurations", + xmlElementName: "HostnameConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HostnameConfiguration" + } + } + } + }, + publicIPAddresses: { + serializedName: "properties.publicIPAddresses", + readOnly: true, + xmlName: "properties.publicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + privateIPAddresses: { + serializedName: "properties.privateIPAddresses", + readOnly: true, + xmlName: "properties.privateIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + publicIpAddressId: { + serializedName: "properties.publicIpAddressId", + xmlName: "properties.publicIpAddressId", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + xmlName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + virtualNetworkConfiguration: { + serializedName: "properties.virtualNetworkConfiguration", + xmlName: "properties.virtualNetworkConfiguration", + type: { + name: "Composite", + className: "VirtualNetworkConfiguration" + } + }, + additionalLocations: { + serializedName: "properties.additionalLocations", + xmlName: "properties.additionalLocations", + xmlElementName: "AdditionalLocation", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalLocation" + } + } + } + }, + customProperties: { + serializedName: "properties.customProperties", + xmlName: "properties.customProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + certificates: { + serializedName: "properties.certificates", + xmlName: "properties.certificates", + xmlElementName: "CertificateConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CertificateConfiguration" + } + } + } + }, + enableClientCertificate: { + defaultValue: false, + serializedName: "properties.enableClientCertificate", + xmlName: "properties.enableClientCertificate", + type: { + name: "Boolean" + } + }, + natGatewayState: { + serializedName: "properties.natGatewayState", + xmlName: "properties.natGatewayState", + type: { + name: "String" + } + }, + outboundPublicIPAddresses: { + serializedName: "properties.outboundPublicIPAddresses", + readOnly: true, + xmlName: "properties.outboundPublicIPAddresses", + xmlElementName: + "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disableGateway: { + defaultValue: false, + serializedName: "properties.disableGateway", + xmlName: "properties.disableGateway", + type: { + name: "Boolean" + } + }, + virtualNetworkType: { + defaultValue: "None", + serializedName: "properties.virtualNetworkType", + xmlName: "properties.virtualNetworkType", + type: { + name: "String" + } + }, + apiVersionConstraint: { + serializedName: "properties.apiVersionConstraint", + xmlName: "properties.apiVersionConstraint", + type: { + name: "Composite", + className: "ApiVersionConstraint" + } + }, + restore: { + defaultValue: false, + serializedName: "properties.restore", + xmlName: "properties.restore", + type: { + name: "Boolean" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + xmlName: "properties.privateEndpointConnections", + xmlElementName: "RemotePrivateEndpointConnectionWrapper", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RemotePrivateEndpointConnectionWrapper" + } + } + } + }, + platformVersion: { + serializedName: "properties.platformVersion", + readOnly: true, + xmlName: "properties.platformVersion", + type: { + name: "String" + } + }, + publisherEmail: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherEmail", + xmlName: "properties.publisherEmail", + type: { + name: "String" + } + }, + publisherName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.publisherName", + xmlName: "properties.publisherName", + type: { + name: "String" + } + } + } + } }; export const UserContractProperties: coreClient.CompositeMapper = { - serializedName: "UserContractProperties", - type: { - name: "Composite", - className: "UserContractProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - firstName: { - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String" - } - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - }, - registrationDate: { - serializedName: "registrationDate", - xmlName: "registrationDate", - type: { - name: "DateTime" - } - }, - groups: { - serializedName: "groups", - readOnly: true, - xmlName: "groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties" + serializedName: "UserContractProperties", + type: { + name: "Composite", + className: "UserContractProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + firstName: { + serializedName: "firstName", + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "lastName", + xmlName: "lastName", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + }, + registrationDate: { + serializedName: "registrationDate", + xmlName: "registrationDate", + type: { + name: "DateTime" + } + }, + groups: { + serializedName: "groups", + readOnly: true, + xmlName: "groups", + xmlElementName: "GroupContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContractProperties" + } + } + } } - } } - } } - } }; export const UserCreateParameterProperties: coreClient.CompositeMapper = { - serializedName: "UserCreateParameterProperties", - type: { - name: "Composite", - className: "UserCreateParameterProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "firstName", - required: true, - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "lastName", - required: true, - xmlName: "lastName", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - }, - appType: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String" - } - }, - confirmation: { - serializedName: "confirmation", - xmlName: "confirmation", - type: { - name: "String" - } - } - } - } + serializedName: "UserCreateParameterProperties", + type: { + name: "Composite", + className: "UserCreateParameterProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "email", + required: true, + xmlName: "email", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "firstName", + required: true, + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "lastName", + required: true, + xmlName: "lastName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + }, + appType: { + serializedName: "appType", + xmlName: "appType", + type: { + name: "String" + } + }, + confirmation: { + serializedName: "confirmation", + xmlName: "confirmation", + type: { + name: "String" + } + } + } + } }; export const UserUpdateParametersProperties: coreClient.CompositeMapper = { - serializedName: "UserUpdateParametersProperties", - type: { - name: "Composite", - className: "UserUpdateParametersProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1 - }, - serializedName: "email", - xmlName: "email", - type: { - name: "String" - } - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String" - } - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String" - } - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String" - } - } - } - } + serializedName: "UserUpdateParametersProperties", + type: { + name: "Composite", + className: "UserUpdateParametersProperties", + modelProperties: { + ...UserEntityBaseParameters.type.modelProperties, + email: { + constraints: { + MaxLength: 254, + MinLength: 1 + }, + serializedName: "email", + xmlName: "email", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + xmlName: "password", + type: { + name: "String" + } + }, + firstName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "firstName", + xmlName: "firstName", + type: { + name: "String" + } + }, + lastName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "lastName", + xmlName: "lastName", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderContractProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContractProperties", - type: { - name: "Composite", - className: "IdentityProviderContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderContractProperties", + type: { + name: "Composite", + className: "IdentityProviderContractProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderCreateContractProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderCreateContractProperties", - type: { - name: "Composite", - className: "IdentityProviderCreateContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - required: true, - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderCreateContractProperties", + type: { + name: "Composite", + className: "IdentityProviderCreateContractProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + required: true, + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + required: true, + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderUpdateProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateProperties", - type: { - name: "Composite", - className: "IdentityProviderUpdateProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderUpdateProperties", + type: { + name: "Composite", + className: "IdentityProviderUpdateProperties", + modelProperties: { + ...IdentityProviderBaseParameters.type.modelProperties, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "clientId", + xmlName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "clientSecret", + xmlName: "clientSecret", + type: { + name: "String" + } + } + } + } }; export const NamedValueContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueContractProperties", - type: { - name: "Composite", - className: "NamedValueContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "NamedValueContractProperties", + type: { + name: "Composite", + className: "NamedValueContractProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const NamedValueCreateContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContractProperties", - type: { - name: "Composite", - className: "NamedValueCreateContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueCreateContractProperties", + type: { + name: "Composite", + className: "NamedValueCreateContractProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + required: true, + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NamedValueUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameterProperties", - type: { - name: "Composite", - className: "NamedValueUpdateParameterProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1 - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueUpdateParameterProperties", + type: { + name: "Composite", + className: "NamedValueUpdateParameterProperties", + modelProperties: { + ...NamedValueEntityBaseParameters.type.modelProperties, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "displayName", + xmlName: "displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096, + MinLength: 1 + }, + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "keyVault", + xmlName: "keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const ApiCreateOrUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateProperties", - type: { - name: "Composite", - className: "ApiCreateOrUpdateProperties", - modelProperties: { - ...ApiContractProperties.type.modelProperties, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String" - } - }, - format: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" - } - }, - wsdlSelector: { - serializedName: "wsdlSelector", - xmlName: "wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector" - } - }, - soapApiType: { - serializedName: "apiType", - xmlName: "apiType", - type: { - name: "String" - } - }, - translateRequiredQueryParametersConduct: { - serializedName: "translateRequiredQueryParameters", - xmlName: "translateRequiredQueryParameters", - type: { - name: "String" - } - } - } - } + serializedName: "ApiCreateOrUpdateProperties", + type: { + name: "Composite", + className: "ApiCreateOrUpdateProperties", + modelProperties: { + ...ApiContractProperties.type.modelProperties, + value: { + serializedName: "value", + xmlName: "value", + type: { + name: "String" + } + }, + format: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } + }, + wsdlSelector: { + serializedName: "wsdlSelector", + xmlName: "wsdlSelector", + type: { + name: "Composite", + className: "ApiCreateOrUpdatePropertiesWsdlSelector" + } + }, + soapApiType: { + serializedName: "apiType", + xmlName: "apiType", + type: { + name: "String" + } + }, + translateRequiredQueryParametersConduct: { + serializedName: "translateRequiredQueryParameters", + xmlName: "translateRequiredQueryParameters", + type: { + name: "String" + } + } + } + } }; export const ApiContract: coreClient.CompositeMapper = { - serializedName: "ApiContract", - type: { - name: "Composite", - className: "ApiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract" - } - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract" - } - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String" - } - }, - apiVersion: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean" - } - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String" - } - }, - apiVersionDescription: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String" - } - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String" - } - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation" - } - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation" - } - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - serviceUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 400 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "ApiContract", + type: { + name: "Composite", + className: "ApiContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authenticationSettings: { + serializedName: "properties.authenticationSettings", + xmlName: "properties.authenticationSettings", + type: { + name: "Composite", + className: "AuthenticationSettingsContract" + } + }, + subscriptionKeyParameterNames: { + serializedName: "properties.subscriptionKeyParameterNames", + xmlName: "properties.subscriptionKeyParameterNames", + type: { + name: "Composite", + className: "SubscriptionKeyParameterNamesContract" + } + }, + apiType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + apiRevision: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.apiRevision", + xmlName: "properties.apiRevision", + type: { + name: "String" + } + }, + apiVersion: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.apiVersion", + xmlName: "properties.apiVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + isOnline: { + serializedName: "properties.isOnline", + readOnly: true, + xmlName: "properties.isOnline", + type: { + name: "Boolean" + } + }, + apiRevisionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiRevisionDescription", + xmlName: "properties.apiRevisionDescription", + type: { + name: "String" + } + }, + apiVersionDescription: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.apiVersionDescription", + xmlName: "properties.apiVersionDescription", + type: { + name: "String" + } + }, + apiVersionSetId: { + serializedName: "properties.apiVersionSetId", + xmlName: "properties.apiVersionSetId", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + termsOfServiceUrl: { + serializedName: "properties.termsOfServiceUrl", + xmlName: "properties.termsOfServiceUrl", + type: { + name: "String" + } + }, + contact: { + serializedName: "properties.contact", + xmlName: "properties.contact", + type: { + name: "Composite", + className: "ApiContactInformation" + } + }, + license: { + serializedName: "properties.license", + xmlName: "properties.license", + type: { + name: "Composite", + className: "ApiLicenseInformation" + } + }, + sourceApiId: { + serializedName: "properties.sourceApiId", + xmlName: "properties.sourceApiId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + serviceUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.serviceUrl", + xmlName: "properties.serviceUrl", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 400 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + protocols: { + serializedName: "properties.protocols", + xmlName: "properties.protocols", + xmlElementName: "Protocol", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiVersionSet: { + serializedName: "properties.apiVersionSet", + xmlName: "properties.apiVersionSet", + type: { + name: "Composite", + className: "ApiVersionSetContractDetails" + } } - } } - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails" - } - } } - } }; export const ApiReleaseContract: coreClient.CompositeMapper = { - serializedName: "ApiReleaseContract", - type: { - name: "Composite", - className: "ApiReleaseContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime" - } - }, - notes: { - serializedName: "properties.notes", - xmlName: "properties.notes", - type: { - name: "String" - } - } - } - } + serializedName: "ApiReleaseContract", + type: { + name: "Composite", + className: "ApiReleaseContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + readOnly: true, + xmlName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "properties.updatedDateTime", + readOnly: true, + xmlName: "properties.updatedDateTime", + type: { + name: "DateTime" + } + }, + notes: { + serializedName: "properties.notes", + xmlName: "properties.notes", + type: { + name: "String" + } + } + } + } }; export const OperationContract: coreClient.CompositeMapper = { - serializedName: "OperationContract", - type: { - name: "Composite", - className: "OperationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract" - } - } - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract" - } - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract" - } - } - } - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String" - } - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String" - } - } - } - } + serializedName: "OperationContract", + type: { + name: "Composite", + className: "OperationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + templateParameters: { + serializedName: "properties.templateParameters", + xmlName: "properties.templateParameters", + xmlElementName: "ParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ParameterContract" + } + } + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + request: { + serializedName: "properties.request", + xmlName: "properties.request", + type: { + name: "Composite", + className: "RequestContract" + } + }, + responses: { + serializedName: "properties.responses", + xmlName: "properties.responses", + xmlElementName: "ResponseContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResponseContract" + } + } + } + }, + policies: { + serializedName: "properties.policies", + xmlName: "properties.policies", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + method: { + serializedName: "properties.method", + xmlName: "properties.method", + type: { + name: "String" + } + }, + urlTemplate: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.urlTemplate", + xmlName: "properties.urlTemplate", + type: { + name: "String" + } + } + } + } }; export const PolicyContract: coreClient.CompositeMapper = { - serializedName: "PolicyContract", - type: { - name: "Composite", - className: "PolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - format: { - defaultValue: "xml", - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - } - } - } + serializedName: "PolicyContract", + type: { + name: "Composite", + className: "PolicyContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + format: { + defaultValue: "xml", + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + } + } + } }; export const TagContract: coreClient.CompositeMapper = { - serializedName: "TagContract", - type: { - name: "Composite", - className: "TagContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagContract", + type: { + name: "Composite", + className: "TagContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const ResolverContract: coreClient.CompositeMapper = { - serializedName: "ResolverContract", - type: { - name: "Composite", - className: "ResolverContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "ResolverContract", + type: { + name: "Composite", + className: "ResolverContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + path: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.path", + xmlName: "properties.path", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const ProductContract: coreClient.CompositeMapper = { - serializedName: "ProductContract", - type: { - name: "Composite", - className: "ProductContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String" - } - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean" - } - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean" - } - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"] - } - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "ProductContract", + type: { + name: "Composite", + className: "ProductContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + terms: { + serializedName: "properties.terms", + xmlName: "properties.terms", + type: { + name: "String" + } + }, + subscriptionRequired: { + serializedName: "properties.subscriptionRequired", + xmlName: "properties.subscriptionRequired", + type: { + name: "Boolean" + } + }, + approvalRequired: { + serializedName: "properties.approvalRequired", + xmlName: "properties.approvalRequired", + type: { + name: "Boolean" + } + }, + subscriptionsLimit: { + serializedName: "properties.subscriptionsLimit", + xmlName: "properties.subscriptionsLimit", + type: { + name: "Number" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: ["notPublished", "published"] + } + }, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const SchemaContract: coreClient.CompositeMapper = { - serializedName: "SchemaContract", - type: { - name: "Composite", - className: "SchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - contentType: { - serializedName: "properties.contentType", - xmlName: "properties.contentType", - type: { - name: "String" - } - }, - value: { - serializedName: "properties.document.value", - xmlName: "properties.document.value", - type: { - name: "String" - } - }, - definitions: { - serializedName: "properties.document.definitions", - xmlName: "properties.document.definitions", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - components: { - serializedName: "properties.document.components", - xmlName: "properties.document.components", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "SchemaContract", + type: { + name: "Composite", + className: "SchemaContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + contentType: { + serializedName: "properties.contentType", + xmlName: "properties.contentType", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.document.value", + xmlName: "properties.document.value", + type: { + name: "String" + } + }, + definitions: { + serializedName: "properties.document.definitions", + xmlName: "properties.document.definitions", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + components: { + serializedName: "properties.document.components", + xmlName: "properties.document.components", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const DiagnosticContract: coreClient.CompositeMapper = { - serializedName: "DiagnosticContract", - type: { - name: "Composite", - className: "DiagnosticContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - alwaysLog: { - serializedName: "properties.alwaysLog", - xmlName: "properties.alwaysLog", - type: { - name: "String" - } - }, - loggerId: { - serializedName: "properties.loggerId", - xmlName: "properties.loggerId", - type: { - name: "String" - } - }, - sampling: { - serializedName: "properties.sampling", - xmlName: "properties.sampling", - type: { - name: "Composite", - className: "SamplingSettings" - } - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings" - } - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings" - } - }, - logClientIp: { - serializedName: "properties.logClientIp", - xmlName: "properties.logClientIp", - type: { - name: "Boolean" - } - }, - httpCorrelationProtocol: { - serializedName: "properties.httpCorrelationProtocol", - xmlName: "properties.httpCorrelationProtocol", - type: { - name: "String" - } - }, - verbosity: { - serializedName: "properties.verbosity", - xmlName: "properties.verbosity", - type: { - name: "String" - } - }, - operationNameFormat: { - serializedName: "properties.operationNameFormat", - xmlName: "properties.operationNameFormat", - type: { - name: "String" - } - }, - metrics: { - serializedName: "properties.metrics", - xmlName: "properties.metrics", - type: { - name: "Boolean" - } - } - } - } + serializedName: "DiagnosticContract", + type: { + name: "Composite", + className: "DiagnosticContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + alwaysLog: { + serializedName: "properties.alwaysLog", + xmlName: "properties.alwaysLog", + type: { + name: "String" + } + }, + loggerId: { + serializedName: "properties.loggerId", + xmlName: "properties.loggerId", + type: { + name: "String" + } + }, + sampling: { + serializedName: "properties.sampling", + xmlName: "properties.sampling", + type: { + name: "Composite", + className: "SamplingSettings" + } + }, + frontend: { + serializedName: "properties.frontend", + xmlName: "properties.frontend", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings" + } + }, + backend: { + serializedName: "properties.backend", + xmlName: "properties.backend", + type: { + name: "Composite", + className: "PipelineDiagnosticSettings" + } + }, + logClientIp: { + serializedName: "properties.logClientIp", + xmlName: "properties.logClientIp", + type: { + name: "Boolean" + } + }, + httpCorrelationProtocol: { + serializedName: "properties.httpCorrelationProtocol", + xmlName: "properties.httpCorrelationProtocol", + type: { + name: "String" + } + }, + verbosity: { + serializedName: "properties.verbosity", + xmlName: "properties.verbosity", + type: { + name: "String" + } + }, + operationNameFormat: { + serializedName: "properties.operationNameFormat", + xmlName: "properties.operationNameFormat", + type: { + name: "String" + } + }, + metrics: { + serializedName: "properties.metrics", + xmlName: "properties.metrics", + type: { + name: "Boolean" + } + } + } + } }; export const IssueContract: coreClient.CompositeMapper = { - serializedName: "IssueContract", - type: { - name: "Composite", - className: "IssueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueContract", + type: { + name: "Composite", + className: "IssueContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + apiId: { + serializedName: "properties.apiId", + xmlName: "properties.apiId", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueCommentContract: coreClient.CompositeMapper = { - serializedName: "IssueCommentContract", - type: { - name: "Composite", - className: "IssueCommentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - text: { - serializedName: "properties.text", - xmlName: "properties.text", - type: { - name: "String" - } - }, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" - } - } - } - } + serializedName: "IssueCommentContract", + type: { + name: "Composite", + className: "IssueCommentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + text: { + serializedName: "properties.text", + xmlName: "properties.text", + type: { + name: "String" + } + }, + createdDate: { + serializedName: "properties.createdDate", + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } + } + } }; export const IssueAttachmentContract: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentContract", - type: { - name: "Composite", - className: "IssueAttachmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - contentFormat: { - serializedName: "properties.contentFormat", - xmlName: "properties.contentFormat", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" - } - } - } - } + serializedName: "IssueAttachmentContract", + type: { + name: "Composite", + className: "IssueAttachmentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + contentFormat: { + serializedName: "properties.contentFormat", + xmlName: "properties.contentFormat", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } + } + } }; export const TagDescriptionContract: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContract", - type: { - name: "Composite", - className: "TagDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String" - } - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String" - } - }, - tagId: { - serializedName: "properties.tagId", - xmlName: "properties.tagId", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - } - } - } + serializedName: "TagDescriptionContract", + type: { + name: "Composite", + className: "TagDescriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + externalDocsUrl: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.externalDocsUrl", + xmlName: "properties.externalDocsUrl", + type: { + name: "String" + } + }, + externalDocsDescription: { + serializedName: "properties.externalDocsDescription", + xmlName: "properties.externalDocsDescription", + type: { + name: "String" + } + }, + tagId: { + serializedName: "properties.tagId", + xmlName: "properties.tagId", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 160, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + } + } + } }; export const WikiContract: coreClient.CompositeMapper = { - serializedName: "WikiContract", - type: { - name: "Composite", - className: "WikiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract" + serializedName: "WikiContract", + type: { + name: "Composite", + className: "WikiContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + documents: { + serializedName: "properties.documents", + xmlName: "properties.documents", + xmlElementName: "WikiDocumentationContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WikiDocumentationContract" + } + } + } } - } } - } } - } }; export const ApiVersionSetContract: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContract", - type: { - name: "Composite", - className: "ApiVersionSetContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String" - } - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String" - } - } - } - } + serializedName: "ApiVersionSetContract", + type: { + name: "Composite", + className: "ApiVersionSetContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + versionQueryName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionQueryName", + xmlName: "properties.versionQueryName", + type: { + name: "String" + } + }, + versionHeaderName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.versionHeaderName", + xmlName: "properties.versionHeaderName", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + versioningScheme: { + serializedName: "properties.versioningScheme", + xmlName: "properties.versioningScheme", + type: { + name: "String" + } + } + } + } }; export const AuthorizationServerContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContract", - type: { - name: "Composite", - className: "AuthorizationServerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerContract", + type: { + name: "Composite", + className: "AuthorizationServerContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "properties.authorizationMethods", + xmlName: "properties.authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "properties.clientAuthenticationMethod", + xmlName: "properties.clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "properties.tokenBodyParameters", + xmlName: "properties.tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "properties.tokenEndpoint", + xmlName: "properties.tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "properties.supportState", + xmlName: "properties.supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "properties.defaultScope", + xmlName: "properties.defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "properties.bearerTokenSendingMethods", + xmlName: "properties.bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "properties.resourceOwnerUsername", + xmlName: "properties.resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "properties.resourceOwnerPassword", + xmlName: "properties.resourceOwnerPassword", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "properties.clientRegistrationEndpoint", + xmlName: "properties.clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "properties.authorizationEndpoint", + xmlName: "properties.authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "properties.grantTypes", + xmlName: "properties.grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationServerUpdateContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerUpdateContract", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - } - } - } - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract" - } - } - } - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String" - } - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean" - } - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String" - } - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String" - } - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String" - } - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String" - } - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String" + serializedName: "AuthorizationServerUpdateContract", + type: { + name: "Composite", + className: "AuthorizationServerUpdateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + authorizationMethods: { + serializedName: "properties.authorizationMethods", + xmlName: "properties.authorizationMethods", + xmlElementName: "AuthorizationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "HEAD", + "OPTIONS", + "TRACE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + } + } + } + }, + clientAuthenticationMethod: { + serializedName: "properties.clientAuthenticationMethod", + xmlName: "properties.clientAuthenticationMethod", + xmlElementName: "ClientAuthenticationMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tokenBodyParameters: { + serializedName: "properties.tokenBodyParameters", + xmlName: "properties.tokenBodyParameters", + xmlElementName: "TokenBodyParameterContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenBodyParameterContract" + } + } + } + }, + tokenEndpoint: { + serializedName: "properties.tokenEndpoint", + xmlName: "properties.tokenEndpoint", + type: { + name: "String" + } + }, + supportState: { + serializedName: "properties.supportState", + xmlName: "properties.supportState", + type: { + name: "Boolean" + } + }, + defaultScope: { + serializedName: "properties.defaultScope", + xmlName: "properties.defaultScope", + type: { + name: "String" + } + }, + bearerTokenSendingMethods: { + serializedName: "properties.bearerTokenSendingMethods", + xmlName: "properties.bearerTokenSendingMethods", + xmlElementName: "BearerTokenSendingMethod", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceOwnerUsername: { + serializedName: "properties.resourceOwnerUsername", + xmlName: "properties.resourceOwnerUsername", + type: { + name: "String" + } + }, + resourceOwnerPassword: { + serializedName: "properties.resourceOwnerPassword", + xmlName: "properties.resourceOwnerPassword", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 50, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + }, + clientRegistrationEndpoint: { + serializedName: "properties.clientRegistrationEndpoint", + xmlName: "properties.clientRegistrationEndpoint", + type: { + name: "String" + } + }, + authorizationEndpoint: { + serializedName: "properties.authorizationEndpoint", + xmlName: "properties.authorizationEndpoint", + type: { + name: "String" + } + }, + grantTypes: { + serializedName: "properties.grantTypes", + xmlName: "properties.grantTypes", + xmlElementName: "GrantType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } } - } - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } } - } }; export const AuthorizationProviderContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderContract", - type: { - name: "Composite", - className: "AuthorizationProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - identityProvider: { - serializedName: "properties.identityProvider", - xmlName: "properties.identityProvider", - type: { - name: "String" - } - }, - oauth2: { - serializedName: "properties.oauth2", - xmlName: "properties.oauth2", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings" - } - } - } - } + serializedName: "AuthorizationProviderContract", + type: { + name: "Composite", + className: "AuthorizationProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + identityProvider: { + serializedName: "properties.identityProvider", + xmlName: "properties.identityProvider", + type: { + name: "String" + } + }, + oauth2: { + serializedName: "properties.oauth2", + xmlName: "properties.oauth2", + type: { + name: "Composite", + className: "AuthorizationProviderOAuth2Settings" + } + } + } + } }; export const AuthorizationContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationContract", - type: { - name: "Composite", - className: "AuthorizationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - authorizationType: { - serializedName: "properties.authorizationType", - xmlName: "properties.authorizationType", - type: { - name: "String" - } - }, - oAuth2GrantType: { - serializedName: "properties.oauth2grantType", - xmlName: "properties.oauth2grantType", - type: { - name: "String" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "AuthorizationError" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationContract", + type: { + name: "Composite", + className: "AuthorizationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + authorizationType: { + serializedName: "properties.authorizationType", + xmlName: "properties.authorizationType", + type: { + name: "String" + } + }, + oAuth2GrantType: { + serializedName: "properties.oauth2grantType", + xmlName: "properties.oauth2grantType", + type: { + name: "String" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "AuthorizationError" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "String" + } + } + } + } }; export const AuthorizationAccessPolicyContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyContract", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tenantId: { - serializedName: "properties.tenantId", - xmlName: "properties.tenantId", - type: { - name: "String" - } - }, - objectId: { - serializedName: "properties.objectId", - xmlName: "properties.objectId", - type: { - name: "String" - } - } - } - } + serializedName: "AuthorizationAccessPolicyContract", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tenantId: { + serializedName: "properties.tenantId", + xmlName: "properties.tenantId", + type: { + name: "String" + } + }, + objectId: { + serializedName: "properties.objectId", + xmlName: "properties.objectId", + type: { + name: "String" + } + } + } + } }; export const BackendContract: coreClient.CompositeMapper = { - serializedName: "BackendContract", - type: { - name: "Composite", - className: "BackendContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract" - } - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract" - } - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties" - } - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1 - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String" - } - } - } - } + serializedName: "BackendContract", + type: { + name: "Composite", + className: "BackendContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties", + xmlName: "properties.properties", + type: { + name: "Composite", + className: "BackendProperties" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Composite", + className: "BackendCredentialsContract" + } + }, + proxy: { + serializedName: "properties.proxy", + xmlName: "properties.proxy", + type: { + name: "Composite", + className: "BackendProxyContract" + } + }, + tls: { + serializedName: "properties.tls", + xmlName: "properties.tls", + type: { + name: "Composite", + className: "BackendTlsProperties" + } + }, + url: { + constraints: { + MaxLength: 2000, + MinLength: 1 + }, + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + protocol: { + serializedName: "properties.protocol", + xmlName: "properties.protocol", + type: { + name: "String" + } + } + } + } }; export const BackendReconnectContract: coreClient.CompositeMapper = { - serializedName: "BackendReconnectContract", - type: { - name: "Composite", - className: "BackendReconnectContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - after: { - serializedName: "properties.after", - xmlName: "properties.after", - type: { - name: "TimeSpan" + serializedName: "BackendReconnectContract", + type: { + name: "Composite", + className: "BackendReconnectContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + after: { + serializedName: "properties.after", + xmlName: "properties.after", + type: { + name: "TimeSpan" + } + } } - } } - } }; export const CacheContract: coreClient.CompositeMapper = { - serializedName: "CacheContract", - type: { - name: "Composite", - className: "CacheContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - connectionString: { - constraints: { - MaxLength: 300 - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String" - } - }, - useFromLocation: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String" - } - }, - resourceId: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "CacheContract", + type: { + name: "Composite", + className: "CacheContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + connectionString: { + constraints: { + MaxLength: 300 + }, + serializedName: "properties.connectionString", + xmlName: "properties.connectionString", + type: { + name: "String" + } + }, + useFromLocation: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.useFromLocation", + xmlName: "properties.useFromLocation", + type: { + name: "String" + } + }, + resourceId: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const CertificateContract: coreClient.CompositeMapper = { - serializedName: "CertificateContract", - type: { - name: "Composite", - className: "CertificateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - thumbprint: { - serializedName: "properties.thumbprint", - xmlName: "properties.thumbprint", - type: { - name: "String" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "CertificateContract", + type: { + name: "Composite", + className: "CertificateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + subject: { + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + thumbprint: { + serializedName: "properties.thumbprint", + xmlName: "properties.thumbprint", + type: { + name: "String" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const ContentTypeContract: coreClient.CompositeMapper = { - serializedName: "ContentTypeContract", - type: { - name: "Composite", - className: "ContentTypeContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - namePropertiesName: { - serializedName: "properties.name", - xmlName: "properties.name", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - schema: { - serializedName: "properties.schema", - xmlName: "properties.schema", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - version: { - serializedName: "properties.version", - xmlName: "properties.version", - type: { - name: "String" - } - } - } - } + serializedName: "ContentTypeContract", + type: { + name: "Composite", + className: "ContentTypeContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + namePropertiesName: { + serializedName: "properties.name", + xmlName: "properties.name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + schema: { + serializedName: "properties.schema", + xmlName: "properties.schema", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + version: { + serializedName: "properties.version", + xmlName: "properties.version", + type: { + name: "String" + } + } + } + } }; export const ContentItemContract: coreClient.CompositeMapper = { - serializedName: "ContentItemContract", - type: { - name: "Composite", - className: "ContentItemContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } + serializedName: "ContentItemContract", + type: { + name: "Composite", + className: "ContentItemContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + xmlName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } - } } - } }; export const DeletedServiceContract: coreClient.CompositeMapper = { - serializedName: "DeletedServiceContract", - type: { - name: "Composite", - className: "DeletedServiceContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String" - } - }, - serviceId: { - serializedName: "properties.serviceId", - xmlName: "properties.serviceId", - type: { - name: "String" - } - }, - scheduledPurgeDate: { - serializedName: "properties.scheduledPurgeDate", - xmlName: "properties.scheduledPurgeDate", - type: { - name: "DateTime" - } - }, - deletionDate: { - serializedName: "properties.deletionDate", - xmlName: "properties.deletionDate", - type: { - name: "DateTime" - } - } - } - } + serializedName: "DeletedServiceContract", + type: { + name: "Composite", + className: "DeletedServiceContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + readOnly: true, + xmlName: "location", + type: { + name: "String" + } + }, + serviceId: { + serializedName: "properties.serviceId", + xmlName: "properties.serviceId", + type: { + name: "String" + } + }, + scheduledPurgeDate: { + serializedName: "properties.scheduledPurgeDate", + xmlName: "properties.scheduledPurgeDate", + type: { + name: "DateTime" + } + }, + deletionDate: { + serializedName: "properties.deletionDate", + xmlName: "properties.deletionDate", + type: { + name: "DateTime" + } + } + } + } }; export const EmailTemplateContract: coreClient.CompositeMapper = { - serializedName: "EmailTemplateContract", - type: { - name: "Composite", - className: "EmailTemplateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String" - } - }, - body: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String" - } - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - isDefault: { - serializedName: "properties.isDefault", - readOnly: true, - xmlName: "properties.isDefault", - type: { - name: "Boolean" - } - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties" + serializedName: "EmailTemplateContract", + type: { + name: "Composite", + className: "EmailTemplateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + subject: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.subject", + xmlName: "properties.subject", + type: { + name: "String" + } + }, + body: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.body", + xmlName: "properties.body", + type: { + name: "String" + } + }, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + isDefault: { + serializedName: "properties.isDefault", + readOnly: true, + xmlName: "properties.isDefault", + type: { + name: "Boolean" + } + }, + parameters: { + serializedName: "properties.parameters", + xmlName: "properties.parameters", + xmlElementName: "EmailTemplateParametersContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailTemplateParametersContractProperties" + } + } + } } - } } - } } - } }; export const GatewayContract: coreClient.CompositeMapper = { - serializedName: "GatewayContract", - type: { - name: "Composite", - className: "GatewayContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - locationData: { - serializedName: "properties.locationData", - xmlName: "properties.locationData", - type: { - name: "Composite", - className: "ResourceLocationDataContract" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - } - } - } + serializedName: "GatewayContract", + type: { + name: "Composite", + className: "GatewayContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + locationData: { + serializedName: "properties.locationData", + xmlName: "properties.locationData", + type: { + name: "Composite", + className: "ResourceLocationDataContract" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + } + } + } }; export const GatewayHostnameConfigurationContract: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfigurationContract", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostname: { - serializedName: "properties.hostname", - xmlName: "properties.hostname", - type: { - name: "String" - } - }, - certificateId: { - serializedName: "properties.certificateId", - xmlName: "properties.certificateId", - type: { - name: "String" - } - }, - negotiateClientCertificate: { - serializedName: "properties.negotiateClientCertificate", - xmlName: "properties.negotiateClientCertificate", - type: { - name: "Boolean" - } - }, - tls10Enabled: { - serializedName: "properties.tls10Enabled", - xmlName: "properties.tls10Enabled", - type: { - name: "Boolean" - } - }, - tls11Enabled: { - serializedName: "properties.tls11Enabled", - xmlName: "properties.tls11Enabled", - type: { - name: "Boolean" - } - }, - http2Enabled: { - serializedName: "properties.http2Enabled", - xmlName: "properties.http2Enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "GatewayHostnameConfigurationContract", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + hostname: { + serializedName: "properties.hostname", + xmlName: "properties.hostname", + type: { + name: "String" + } + }, + certificateId: { + serializedName: "properties.certificateId", + xmlName: "properties.certificateId", + type: { + name: "String" + } + }, + negotiateClientCertificate: { + serializedName: "properties.negotiateClientCertificate", + xmlName: "properties.negotiateClientCertificate", + type: { + name: "Boolean" + } + }, + tls10Enabled: { + serializedName: "properties.tls10Enabled", + xmlName: "properties.tls10Enabled", + type: { + name: "Boolean" + } + }, + tls11Enabled: { + serializedName: "properties.tls11Enabled", + xmlName: "properties.tls11Enabled", + type: { + name: "Boolean" + } + }, + http2Enabled: { + serializedName: "properties.http2Enabled", + xmlName: "properties.http2Enabled", + type: { + name: "Boolean" + } + } + } + } }; export const AssociationContract: coreClient.CompositeMapper = { - serializedName: "AssociationContract", - type: { - name: "Composite", - className: "AssociationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - defaultValue: "created", - isConstant: true, - serializedName: "properties.provisioningState", - type: { - name: "String" + serializedName: "AssociationContract", + type: { + name: "Composite", + className: "AssociationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + defaultValue: "created", + isConstant: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityContract: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthorityContract", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - isTrusted: { - serializedName: "properties.isTrusted", - xmlName: "properties.isTrusted", - type: { - name: "Boolean" + serializedName: "GatewayCertificateAuthorityContract", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + isTrusted: { + serializedName: "properties.isTrusted", + xmlName: "properties.isTrusted", + type: { + name: "Boolean" + } + } } - } } - } }; export const GroupContract: coreClient.CompositeMapper = { - serializedName: "GroupContract", - type: { - name: "Composite", - className: "GroupContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - builtIn: { - serializedName: "properties.builtIn", - readOnly: true, - xmlName: "properties.builtIn", - type: { - name: "Boolean" - } - }, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"] - } - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String" - } - } - } - } + serializedName: "GroupContract", + type: { + name: "Composite", + className: "GroupContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 300, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + builtIn: { + serializedName: "properties.builtIn", + readOnly: true, + xmlName: "properties.builtIn", + type: { + name: "Boolean" + } + }, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "Enum", + allowedValues: ["custom", "system", "external"] + } + }, + externalId: { + serializedName: "properties.externalId", + xmlName: "properties.externalId", + type: { + name: "String" + } + } + } + } }; export const UserContract: coreClient.CompositeMapper = { - serializedName: "UserContract", - type: { - name: "Composite", - className: "UserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String" - } - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String" - } - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract" - } - } - } - }, - firstName: { - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String" - } - }, - lastName: { - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String" - } - }, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" - } - }, - registrationDate: { - serializedName: "properties.registrationDate", - xmlName: "properties.registrationDate", - type: { - name: "DateTime" - } - }, - groups: { - serializedName: "properties.groups", - readOnly: true, - xmlName: "properties.groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties" + serializedName: "UserContract", + type: { + name: "Composite", + className: "UserContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + defaultValue: "active", + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "String" + } + }, + note: { + serializedName: "properties.note", + xmlName: "properties.note", + type: { + name: "String" + } + }, + identities: { + serializedName: "properties.identities", + xmlName: "properties.identities", + xmlElementName: "UserIdentityContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserIdentityContract" + } + } + } + }, + firstName: { + serializedName: "properties.firstName", + xmlName: "properties.firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "properties.lastName", + xmlName: "properties.lastName", + type: { + name: "String" + } + }, + email: { + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + }, + registrationDate: { + serializedName: "properties.registrationDate", + xmlName: "properties.registrationDate", + type: { + name: "DateTime" + } + }, + groups: { + serializedName: "properties.groups", + readOnly: true, + xmlName: "properties.groups", + xmlElementName: "GroupContractProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupContractProperties" + } + } + } } - } } - } } - } }; export const IdentityProviderContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContract", - type: { - name: "Composite", - className: "IdentityProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderContract", + type: { + name: "Composite", + className: "IdentityProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const IdentityProviderCreateContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderCreateContract", - type: { - name: "Composite", - className: "IdentityProviderCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String" - } - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String" - } - }, - allowedTenants: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String" - } - }, - signupPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String" - } - }, - signinPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String" - } - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String" - } - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String" - } - }, - clientLibrary: { - constraints: { - MaxLength: 16 - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String" - } - }, - clientId: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - constraints: { - MinLength: 1 - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - } - } - } + serializedName: "IdentityProviderCreateContract", + type: { + name: "Composite", + className: "IdentityProviderCreateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", + xmlName: "properties.type", + type: { + name: "String" + } + }, + signinTenant: { + serializedName: "properties.signinTenant", + xmlName: "properties.signinTenant", + type: { + name: "String" + } + }, + allowedTenants: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.allowedTenants", + xmlName: "properties.allowedTenants", + xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + authority: { + serializedName: "properties.authority", + xmlName: "properties.authority", + type: { + name: "String" + } + }, + signupPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signupPolicyName", + xmlName: "properties.signupPolicyName", + type: { + name: "String" + } + }, + signinPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.signinPolicyName", + xmlName: "properties.signinPolicyName", + type: { + name: "String" + } + }, + profileEditingPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.profileEditingPolicyName", + xmlName: "properties.profileEditingPolicyName", + type: { + name: "String" + } + }, + passwordResetPolicyName: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.passwordResetPolicyName", + xmlName: "properties.passwordResetPolicyName", + type: { + name: "String" + } + }, + clientLibrary: { + constraints: { + MaxLength: 16 + }, + serializedName: "properties.clientLibrary", + xmlName: "properties.clientLibrary", + type: { + name: "String" + } + }, + clientId: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + constraints: { + MinLength: 1 + }, + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + } + } + } }; export const LoggerContract: coreClient.CompositeMapper = { - serializedName: "LoggerContract", - type: { - name: "Composite", - className: "LoggerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 256 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean" - } - }, - resourceId: { - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String" - } - } - } - } + serializedName: "LoggerContract", + type: { + name: "Composite", + className: "LoggerContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + loggerType: { + serializedName: "properties.loggerType", + xmlName: "properties.loggerType", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 256 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + credentials: { + serializedName: "properties.credentials", + xmlName: "properties.credentials", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + isBuffered: { + serializedName: "properties.isBuffered", + xmlName: "properties.isBuffered", + type: { + name: "Boolean" + } + }, + resourceId: { + serializedName: "properties.resourceId", + xmlName: "properties.resourceId", + type: { + name: "String" + } + } + } + } }; export const NamedValueContract: coreClient.CompositeMapper = { - serializedName: "NamedValueContract", - type: { - name: "Composite", - className: "NamedValueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties" - } - } - } - } + serializedName: "NamedValueContract", + type: { + name: "Composite", + className: "NamedValueContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractProperties" + } + } + } + } }; export const NamedValueCreateContract: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContract", - type: { - name: "Composite", - className: "NamedValueCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32 - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean" - } - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - value: { - constraints: { - MaxLength: 4096 - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties" - } - } - } - } + serializedName: "NamedValueCreateContract", + type: { + name: "Composite", + className: "NamedValueCreateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + constraints: { + MaxItems: 32 + }, + serializedName: "properties.tags", + xmlName: "properties.tags", + xmlElementName: "NamedValueEntityBaseParametersTagsItem", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secret: { + serializedName: "properties.secret", + xmlName: "properties.secret", + type: { + name: "Boolean" + } + }, + displayName: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9-._]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + value: { + constraints: { + MaxLength: 4096 + }, + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + keyVault: { + serializedName: "properties.keyVault", + xmlName: "properties.keyVault", + type: { + name: "Composite", + className: "KeyVaultContractCreateProperties" + } + } + } + } }; export const NotificationContract: coreClient.CompositeMapper = { - serializedName: "NotificationContract", - type: { - name: "Composite", - className: "NotificationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 1000, - MinLength: 1 - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - recipients: { - serializedName: "properties.recipients", - xmlName: "properties.recipients", - type: { - name: "Composite", - className: "RecipientsContractProperties" - } - } - } - } + serializedName: "NotificationContract", + type: { + name: "Composite", + className: "NotificationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + constraints: { + MaxLength: 1000, + MinLength: 1 + }, + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + recipients: { + serializedName: "properties.recipients", + xmlName: "properties.recipients", + type: { + name: "Composite", + className: "RecipientsContractProperties" + } + } + } + } }; export const RecipientUserContract: coreClient.CompositeMapper = { - serializedName: "RecipientUserContract", - type: { - name: "Composite", - className: "RecipientUserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String" + serializedName: "RecipientUserContract", + type: { + name: "Composite", + className: "RecipientUserContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + userId: { + serializedName: "properties.userId", + xmlName: "properties.userId", + type: { + name: "String" + } + } } - } } - } }; export const RecipientEmailContract: coreClient.CompositeMapper = { - serializedName: "RecipientEmailContract", - type: { - name: "Composite", - className: "RecipientEmailContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String" + serializedName: "RecipientEmailContract", + type: { + name: "Composite", + className: "RecipientEmailContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + email: { + serializedName: "properties.email", + xmlName: "properties.email", + type: { + name: "String" + } + } } - } } - } }; export const OpenidConnectProviderContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderContract", - type: { - name: "Composite", - className: "OpenidConnectProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String" - } - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String" - } - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean" - } - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean" - } - } - } - } + serializedName: "OpenidConnectProviderContract", + type: { + name: "Composite", + className: "OpenidConnectProviderContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + constraints: { + MaxLength: 50 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + metadataEndpoint: { + serializedName: "properties.metadataEndpoint", + xmlName: "properties.metadataEndpoint", + type: { + name: "String" + } + }, + clientId: { + serializedName: "properties.clientId", + xmlName: "properties.clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "properties.clientSecret", + xmlName: "properties.clientSecret", + type: { + name: "String" + } + }, + useInTestConsole: { + serializedName: "properties.useInTestConsole", + xmlName: "properties.useInTestConsole", + type: { + name: "Boolean" + } + }, + useInApiDocumentation: { + serializedName: "properties.useInApiDocumentation", + xmlName: "properties.useInApiDocumentation", + type: { + name: "Boolean" + } + } + } + } }; export const PolicyDescriptionContract: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionContract", - type: { - name: "Composite", - className: "PolicyDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - xmlName: "properties.description", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - readOnly: true, - xmlName: "properties.scope", - type: { - name: "Number" - } - } - } - } + serializedName: "PolicyDescriptionContract", + type: { + name: "Composite", + className: "PolicyDescriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + readOnly: true, + xmlName: "properties.description", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + readOnly: true, + xmlName: "properties.scope", + type: { + name: "Number" + } + } + } + } }; export const PolicyFragmentContract: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentContract", - type: { - name: "Composite", - className: "PolicyFragmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String" - } - }, - description: { - constraints: { - MaxLength: 1000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String" - } - } - } - } + serializedName: "PolicyFragmentContract", + type: { + name: "Composite", + className: "PolicyFragmentContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "String" + } + }, + description: { + constraints: { + MaxLength: 1000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + format: { + serializedName: "properties.format", + xmlName: "properties.format", + type: { + name: "String" + } + } + } + } }; export const ResourceCollectionValueItem: coreClient.CompositeMapper = { - serializedName: "ResourceCollectionValueItem", - type: { - name: "Composite", - className: "ResourceCollectionValueItem", - modelProperties: { - ...ProxyResource.type.modelProperties + serializedName: "ResourceCollectionValueItem", + type: { + name: "Composite", + className: "ResourceCollectionValueItem", + modelProperties: { + ...ProxyResource.type.modelProperties + } } - } }; export const PortalConfigContract: coreClient.CompositeMapper = { - serializedName: "PortalConfigContract", - type: { - name: "Composite", - className: "PortalConfigContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - enableBasicAuth: { - defaultValue: true, - serializedName: "properties.enableBasicAuth", - xmlName: "properties.enableBasicAuth", - type: { - name: "Boolean" - } - }, - signin: { - serializedName: "properties.signin", - xmlName: "properties.signin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin" - } - }, - signup: { - serializedName: "properties.signup", - xmlName: "properties.signup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup" - } - }, - delegation: { - serializedName: "properties.delegation", - xmlName: "properties.delegation", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties" - } - }, - cors: { - serializedName: "properties.cors", - xmlName: "properties.cors", - type: { - name: "Composite", - className: "PortalConfigCorsProperties" - } - }, - csp: { - serializedName: "properties.csp", - xmlName: "properties.csp", - type: { - name: "Composite", - className: "PortalConfigCspProperties" - } - } - } - } + serializedName: "PortalConfigContract", + type: { + name: "Composite", + className: "PortalConfigContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + enableBasicAuth: { + defaultValue: true, + serializedName: "properties.enableBasicAuth", + xmlName: "properties.enableBasicAuth", + type: { + name: "Boolean" + } + }, + signin: { + serializedName: "properties.signin", + xmlName: "properties.signin", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignin" + } + }, + signup: { + serializedName: "properties.signup", + xmlName: "properties.signup", + type: { + name: "Composite", + className: "PortalConfigPropertiesSignup" + } + }, + delegation: { + serializedName: "properties.delegation", + xmlName: "properties.delegation", + type: { + name: "Composite", + className: "PortalConfigDelegationProperties" + } + }, + cors: { + serializedName: "properties.cors", + xmlName: "properties.cors", + type: { + name: "Composite", + className: "PortalConfigCorsProperties" + } + }, + csp: { + serializedName: "properties.csp", + xmlName: "properties.csp", + type: { + name: "Composite", + className: "PortalConfigCspProperties" + } + } + } + } }; export const PortalRevisionContract: coreClient.CompositeMapper = { - serializedName: "PortalRevisionContract", - type: { - name: "Composite", - className: "PortalRevisionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - statusDetails: { - constraints: { - MaxLength: 2000 - }, - serializedName: "properties.statusDetails", - readOnly: true, - xmlName: "properties.statusDetails", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - readOnly: true, - xmlName: "properties.status", - type: { - name: "String" - } - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean" - } - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime" - } - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime" - } - } - } - } + serializedName: "PortalRevisionContract", + type: { + name: "Composite", + className: "PortalRevisionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + statusDetails: { + constraints: { + MaxLength: 2000 + }, + serializedName: "properties.statusDetails", + readOnly: true, + xmlName: "properties.statusDetails", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + xmlName: "properties.status", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "properties.isCurrent", + xmlName: "properties.isCurrent", + type: { + name: "Boolean" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + readOnly: true, + xmlName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + updatedDateTime: { + serializedName: "properties.updatedDateTime", + readOnly: true, + xmlName: "properties.updatedDateTime", + type: { + name: "DateTime" + } + } + } + } }; export const PortalSettingsContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingsContract", - type: { - name: "Composite", - className: "PortalSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String" - } - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties" - } - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties" - } - } - } - } + serializedName: "PortalSettingsContract", + type: { + name: "Composite", + className: "PortalSettingsContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + url: { + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "properties.validationKey", + xmlName: "properties.validationKey", + type: { + name: "String" + } + }, + subscriptions: { + serializedName: "properties.subscriptions", + xmlName: "properties.subscriptions", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties" + } + }, + userRegistration: { + serializedName: "properties.userRegistration", + xmlName: "properties.userRegistration", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + }, + termsOfService: { + serializedName: "properties.termsOfService", + xmlName: "properties.termsOfService", + type: { + name: "Composite", + className: "TermsOfServiceProperties" + } + } + } + } }; export const PortalSigninSettings: coreClient.CompositeMapper = { - serializedName: "PortalSigninSettings", - type: { - name: "Composite", - className: "PortalSigninSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" + serializedName: "PortalSigninSettings", + type: { + name: "Composite", + className: "PortalSigninSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } } - } } - } }; export const PortalSignupSettings: coreClient.CompositeMapper = { - serializedName: "PortalSignupSettings", - type: { - name: "Composite", - className: "PortalSignupSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties" - } - } - } - } + serializedName: "PortalSignupSettings", + type: { + name: "Composite", + className: "PortalSignupSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + }, + termsOfService: { + serializedName: "properties.termsOfService", + xmlName: "properties.termsOfService", + type: { + name: "Composite", + className: "TermsOfServiceProperties" + } + } + } + } }; export const PortalDelegationSettings: coreClient.CompositeMapper = { - serializedName: "PortalDelegationSettings", - type: { - name: "Composite", - className: "PortalDelegationSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String" - } - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String" - } - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties" - } - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties" - } - } - } - } + serializedName: "PortalDelegationSettings", + type: { + name: "Composite", + className: "PortalDelegationSettings", + modelProperties: { + ...ProxyResource.type.modelProperties, + url: { + serializedName: "properties.url", + xmlName: "properties.url", + type: { + name: "String" + } + }, + validationKey: { + serializedName: "properties.validationKey", + xmlName: "properties.validationKey", + type: { + name: "String" + } + }, + subscriptions: { + serializedName: "properties.subscriptions", + xmlName: "properties.subscriptions", + type: { + name: "Composite", + className: "SubscriptionsDelegationSettingsProperties" + } + }, + userRegistration: { + serializedName: "properties.userRegistration", + xmlName: "properties.userRegistration", + type: { + name: "Composite", + className: "RegistrationDelegationSettingsProperties" + } + } + } + } }; export const SubscriptionContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionContract", - type: { - name: "Composite", - className: "SubscriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String" - } - }, - displayName: { - constraints: { - MaxLength: 100 - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String" - } - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled" - ] - } - }, - createdDate: { - serializedName: "properties.createdDate", - readOnly: true, - xmlName: "properties.createdDate", - type: { - name: "DateTime" - } - }, - startDate: { - serializedName: "properties.startDate", - xmlName: "properties.startDate", - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime" - } - }, - endDate: { - serializedName: "properties.endDate", - xmlName: "properties.endDate", - type: { - name: "DateTime" - } - }, - notificationDate: { - serializedName: "properties.notificationDate", - xmlName: "properties.notificationDate", - type: { - name: "DateTime" - } - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String" - } - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String" - } - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String" - } - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean" - } - } - } - } + serializedName: "SubscriptionContract", + type: { + name: "Composite", + className: "SubscriptionContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + ownerId: { + serializedName: "properties.ownerId", + xmlName: "properties.ownerId", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + xmlName: "properties.scope", + type: { + name: "String" + } + }, + displayName: { + constraints: { + MaxLength: 100 + }, + serializedName: "properties.displayName", + xmlName: "properties.displayName", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + xmlName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "suspended", + "active", + "expired", + "submitted", + "rejected", + "cancelled" + ] + } + }, + createdDate: { + serializedName: "properties.createdDate", + readOnly: true, + xmlName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + startDate: { + serializedName: "properties.startDate", + xmlName: "properties.startDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + serializedName: "properties.expirationDate", + xmlName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + xmlName: "properties.endDate", + type: { + name: "DateTime" + } + }, + notificationDate: { + serializedName: "properties.notificationDate", + xmlName: "properties.notificationDate", + type: { + name: "DateTime" + } + }, + primaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.primaryKey", + xmlName: "properties.primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "properties.secondaryKey", + xmlName: "properties.secondaryKey", + type: { + name: "String" + } + }, + stateComment: { + serializedName: "properties.stateComment", + xmlName: "properties.stateComment", + type: { + name: "String" + } + }, + allowTracing: { + serializedName: "properties.allowTracing", + xmlName: "properties.allowTracing", + type: { + name: "Boolean" + } + } + } + } }; export const GlobalSchemaContract: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaContract", - type: { - name: "Composite", - className: "GlobalSchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - schemaType: { - serializedName: "properties.schemaType", - xmlName: "properties.schemaType", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String" - } - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "any" - } - }, - document: { - serializedName: "properties.document", - xmlName: "properties.document", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + serializedName: "GlobalSchemaContract", + type: { + name: "Composite", + className: "GlobalSchemaContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + schemaType: { + serializedName: "properties.schemaType", + xmlName: "properties.schemaType", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + xmlName: "properties.description", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.value", + xmlName: "properties.value", + type: { + name: "any" + } + }, + document: { + serializedName: "properties.document", + xmlName: "properties.document", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } }; export const TenantSettingsContract: coreClient.CompositeMapper = { - serializedName: "TenantSettingsContract", - type: { - name: "Composite", - className: "TenantSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - settings: { - serializedName: "properties.settings", - xmlName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "String" } } + serializedName: "TenantSettingsContract", + type: { + name: "Composite", + className: "TenantSettingsContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + settings: { + serializedName: "properties.settings", + xmlName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } } - } } - } }; export const AccessInformationContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationContract", - type: { - name: "Composite", - className: "AccessInformationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String" - } - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } + serializedName: "AccessInformationContract", + type: { + name: "Composite", + className: "AccessInformationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + xmlName: "properties.principalId", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.enabled", + xmlName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } }; export const OperationResultContract: coreClient.CompositeMapper = { - serializedName: "OperationResultContract", - type: { - name: "Composite", - className: "OperationResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] - } - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime" - } - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime" - } - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String" - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody" - } - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "OperationResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResultLogItemContract" + serializedName: "OperationResultContract", + type: { + name: "Composite", + className: "OperationResultContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "Enum", + allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] + } + }, + started: { + serializedName: "properties.started", + xmlName: "properties.started", + type: { + name: "DateTime" + } + }, + updated: { + serializedName: "properties.updated", + xmlName: "properties.updated", + type: { + name: "DateTime" + } + }, + resultInfo: { + serializedName: "properties.resultInfo", + xmlName: "properties.resultInfo", + type: { + name: "String" + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + }, + actionLog: { + serializedName: "properties.actionLog", + readOnly: true, + xmlName: "properties.actionLog", + xmlElementName: "OperationResultLogItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResultLogItemContract" + } + } + } } - } } - } } - } }; export const TenantConfigurationSyncStateContract: coreClient.CompositeMapper = { - serializedName: "TenantConfigurationSyncStateContract", - type: { - name: "Composite", - className: "TenantConfigurationSyncStateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String" - } - }, - commitId: { - serializedName: "properties.commitId", - xmlName: "properties.commitId", - type: { - name: "String" - } - }, - isExport: { - serializedName: "properties.isExport", - xmlName: "properties.isExport", - type: { - name: "Boolean" - } - }, - isSynced: { - serializedName: "properties.isSynced", - xmlName: "properties.isSynced", - type: { - name: "Boolean" - } - }, - isGitEnabled: { - serializedName: "properties.isGitEnabled", - xmlName: "properties.isGitEnabled", - type: { - name: "Boolean" - } - }, - syncDate: { - serializedName: "properties.syncDate", - xmlName: "properties.syncDate", - type: { - name: "DateTime" - } - }, - configurationChangeDate: { - serializedName: "properties.configurationChangeDate", - xmlName: "properties.configurationChangeDate", - type: { - name: "DateTime" - } - }, - lastOperationId: { - serializedName: "properties.lastOperationId", - xmlName: "properties.lastOperationId", - type: { - name: "String" - } - } - } - } + serializedName: "TenantConfigurationSyncStateContract", + type: { + name: "Composite", + className: "TenantConfigurationSyncStateContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + branch: { + serializedName: "properties.branch", + xmlName: "properties.branch", + type: { + name: "String" + } + }, + commitId: { + serializedName: "properties.commitId", + xmlName: "properties.commitId", + type: { + name: "String" + } + }, + isExport: { + serializedName: "properties.isExport", + xmlName: "properties.isExport", + type: { + name: "Boolean" + } + }, + isSynced: { + serializedName: "properties.isSynced", + xmlName: "properties.isSynced", + type: { + name: "Boolean" + } + }, + isGitEnabled: { + serializedName: "properties.isGitEnabled", + xmlName: "properties.isGitEnabled", + type: { + name: "Boolean" + } + }, + syncDate: { + serializedName: "properties.syncDate", + xmlName: "properties.syncDate", + type: { + name: "DateTime" + } + }, + configurationChangeDate: { + serializedName: "properties.configurationChangeDate", + xmlName: "properties.configurationChangeDate", + type: { + name: "DateTime" + } + }, + lastOperationId: { + serializedName: "properties.lastOperationId", + xmlName: "properties.lastOperationId", + type: { + name: "String" + } + } + } + } }; export const DocumentationContract: coreClient.CompositeMapper = { - serializedName: "DocumentationContract", - type: { - name: "Composite", - className: "DocumentationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String" - } - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String" - } - } - } - } + serializedName: "DocumentationContract", + type: { + name: "Composite", + className: "DocumentationContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + title: { + serializedName: "properties.title", + xmlName: "properties.title", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + xmlName: "properties.content", + type: { + name: "String" + } + } + } + } }; export const ResolverResultContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultContract", - type: { - name: "Composite", - className: "ResolverResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String" - } - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] - } - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime" - } - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime" - } - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String" - } - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody" - } - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "ResolverResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverResultLogItemContract" + serializedName: "ResolverResultContract", + type: { + name: "Composite", + className: "ResolverResultContract", + modelProperties: { + ...ProxyResource.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + xmlName: "properties.id", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + xmlName: "properties.status", + type: { + name: "Enum", + allowedValues: ["Started", "InProgress", "Succeeded", "Failed"] + } + }, + started: { + serializedName: "properties.started", + xmlName: "properties.started", + type: { + name: "DateTime" + } + }, + updated: { + serializedName: "properties.updated", + xmlName: "properties.updated", + type: { + name: "DateTime" + } + }, + resultInfo: { + serializedName: "properties.resultInfo", + xmlName: "properties.resultInfo", + type: { + name: "String" + } + }, + error: { + serializedName: "properties.error", + xmlName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + }, + actionLog: { + serializedName: "properties.actionLog", + readOnly: true, + xmlName: "properties.actionLog", + xmlElementName: "ResolverResultLogItemContract", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResolverResultLogItemContract" + } + } + } } - } } - } } - } }; export const ApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiGetHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getHeaders", - type: { - name: "Composite", - className: "ApiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_getHeaders", + type: { + name: "Composite", + className: "ApiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_updateHeaders", - type: { - name: "Composite", - className: "ApiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Api_updateHeaders", + type: { + name: "Composite", + className: "ApiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiReleaseGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_getHeaders", + type: { + name: "Composite", + className: "ApiReleaseGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiReleaseCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiReleaseCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiReleaseUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_updateHeaders", - type: { - name: "Composite", - className: "ApiReleaseUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiRelease_updateHeaders", + type: { + name: "Composite", + className: "ApiReleaseUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiOperationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getHeaders", - type: { - name: "Composite", - className: "ApiOperationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_getHeaders", + type: { + name: "Composite", + className: "ApiOperationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiOperationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_updateHeaders", - type: { - name: "Composite", - className: "ApiOperationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperation_updateHeaders", + type: { + name: "Composite", + className: "ApiOperationUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_getHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiOperationPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiOperationPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiOperationPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByOperationHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByOperationHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByOperationHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByOperationHeaders", - type: { - name: "Composite", - className: "TagGetByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByOperationHeaders", + type: { + name: "Composite", + className: "TagGetByOperationHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByApiHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByApiHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByApiHeaders", - type: { - name: "Composite", - className: "TagGetByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByApiHeaders", + type: { + name: "Composite", + className: "TagGetByApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagAssignToApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_assignToApiHeaders", - type: { - name: "Composite", - className: "TagAssignToApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_assignToApiHeaders", + type: { + name: "Composite", + className: "TagAssignToApiHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByProductHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateByProductHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateByProductHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByProductHeaders", - type: { - name: "Composite", - className: "TagGetByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getByProductHeaders", + type: { + name: "Composite", + className: "TagGetByProductHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetEntityStateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getEntityStateHeaders", + type: { + name: "Composite", + className: "TagGetEntityStateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagGetHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getHeaders", - type: { - name: "Composite", - className: "TagGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_getHeaders", + type: { + name: "Composite", + className: "TagGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_createOrUpdateHeaders", - type: { - name: "Composite", - className: "TagCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_createOrUpdateHeaders", + type: { + name: "Composite", + className: "TagCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TagUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_updateHeaders", - type: { - name: "Composite", - className: "TagUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Tag_updateHeaders", + type: { + name: "Composite", + className: "TagUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_getEntityTagHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_getHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_updateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolver_updateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_getHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GraphQLApiResolverPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GraphQLApiResolverPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GraphQLApiResolverPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_getHeaders", + type: { + name: "Composite", + className: "ApiPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiSchemaGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_getHeaders", + type: { + name: "Composite", + className: "ApiSchemaGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiSchema_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiSchemaCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_getHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiDiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_updateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiDiagnostic_updateHeaders", + type: { + name: "Composite", + className: "ApiDiagnosticUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getHeaders", - type: { - name: "Composite", - className: "ApiIssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_getHeaders", + type: { + name: "Composite", + className: "ApiIssueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_updateHeaders", - type: { - name: "Composite", - className: "ApiIssueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssue_updateHeaders", + type: { + name: "Composite", + className: "ApiIssueUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_getHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueCommentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueComment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueCommentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_getHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiIssueAttachmentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiIssueAttachment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiIssueAttachmentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_getHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_getHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiTagDescriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiTagDescription_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiTagDescriptionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiWikiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getHeaders", - type: { - name: "Composite", - className: "ApiWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_getHeaders", + type: { + name: "Composite", + className: "ApiWikiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiWikiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_updateHeaders", - type: { - name: "Composite", - className: "ApiWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiWiki_updateHeaders", + type: { + name: "Composite", + className: "ApiWikiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_getEntityTagHeaders", + type: { + name: "Composite", + className: "ApiVersionSetGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_getHeaders", + type: { + name: "Composite", + className: "ApiVersionSetGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ApiVersionSetCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ApiVersionSetUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_updateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ApiVersionSet_updateHeaders", + type: { + name: "Composite", + className: "ApiVersionSetUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_getEntityTagHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_getEntityTagHeaders", + type: { + name: "Composite", + className: "AuthorizationServerGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_getHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_getHeaders", + type: { + name: "Composite", + className: "AuthorizationServerGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationServerCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_updateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_updateHeaders", + type: { + name: "Composite", + className: "AuthorizationServerUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationServerListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_listSecretsHeaders", - type: { - name: "Composite", - className: "AuthorizationServerListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationServer_listSecretsHeaders", + type: { + name: "Composite", + className: "AuthorizationServerListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationProvider_getHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationProvider_getHeaders", + type: { + name: "Composite", + className: "AuthorizationProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_getHeaders", - type: { - name: "Composite", - className: "AuthorizationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_getHeaders", + type: { + name: "Composite", + className: "AuthorizationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationConfirmConsentCodeHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_confirmConsentCodeHeaders", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Authorization_confirmConsentCodeHeaders", + type: { + name: "Composite", + className: "AuthorizationConfirmConsentCodeHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationLoginLinksPostHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginLinks_postHeaders", - type: { - name: "Composite", - className: "AuthorizationLoginLinksPostHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationLoginLinks_postHeaders", + type: { + name: "Composite", + className: "AuthorizationLoginLinksPostHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicy_getHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationAccessPolicy_getHeaders", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const AuthorizationAccessPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "AuthorizationAccessPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "AuthorizationAccessPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getEntityTagHeaders", - type: { - name: "Composite", - className: "BackendGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_getEntityTagHeaders", + type: { + name: "Composite", + className: "BackendGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendGetHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getHeaders", - type: { - name: "Composite", - className: "BackendGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_getHeaders", + type: { + name: "Composite", + className: "BackendGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_createOrUpdateHeaders", - type: { - name: "Composite", - className: "BackendCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_createOrUpdateHeaders", + type: { + name: "Composite", + className: "BackendCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const BackendUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_updateHeaders", - type: { - name: "Composite", - className: "BackendUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Backend_updateHeaders", + type: { + name: "Composite", + className: "BackendUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getEntityTagHeaders", - type: { - name: "Composite", - className: "CacheGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_getEntityTagHeaders", + type: { + name: "Composite", + className: "CacheGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheGetHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getHeaders", - type: { - name: "Composite", - className: "CacheGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_getHeaders", + type: { + name: "Composite", + className: "CacheGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CacheCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_createOrUpdateHeaders", + type: { + name: "Composite", + className: "CacheCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CacheUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_updateHeaders", - type: { - name: "Composite", - className: "CacheUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Cache_updateHeaders", + type: { + name: "Composite", + className: "CacheUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getEntityTagHeaders", - type: { - name: "Composite", - className: "CertificateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_getEntityTagHeaders", + type: { + name: "Composite", + className: "CertificateGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateGetHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getHeaders", - type: { - name: "Composite", - className: "CertificateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_getHeaders", + type: { + name: "Composite", + className: "CertificateGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_createOrUpdateHeaders", + type: { + name: "Composite", + className: "CertificateCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const CertificateRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_refreshSecretHeaders", - type: { - name: "Composite", - className: "CertificateRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Certificate_refreshSecretHeaders", + type: { + name: "Composite", + className: "CertificateRefreshSecretHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentTypeGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_getHeaders", - type: { - name: "Composite", - className: "ContentTypeGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentType_getHeaders", + type: { + name: "Composite", + className: "ContentTypeGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentTypeCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentTypeCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentType_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ContentTypeCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getEntityTagHeaders", - type: { - name: "Composite", - className: "ContentItemGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_getEntityTagHeaders", + type: { + name: "Composite", + className: "ContentItemGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getHeaders", - type: { - name: "Composite", - className: "ContentItemGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_getHeaders", + type: { + name: "Composite", + className: "ContentItemGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ContentItemCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentItemCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ContentItem_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ContentItemCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DeletedServicesPurgeHeaders: coreClient.CompositeMapper = { - serializedName: "DeletedServices_purgeHeaders", - type: { - name: "Composite", - className: "DeletedServicesPurgeHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "DeletedServices_purgeHeaders", + type: { + name: "Composite", + className: "DeletedServicesPurgeHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceRestoreHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_restoreHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceRestoreHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_restoreHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceRestoreHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceBackupHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_backupHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceBackupHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_backupHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceBackupHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceMigrateToStv2Headers: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_migrateToStv2Headers", - type: { - name: "Composite", - className: "ApiManagementServiceMigrateToStv2Headers", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: "ApiManagementService_migrateToStv2Headers", + type: { + name: "Composite", + className: "ApiManagementServiceMigrateToStv2Headers", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders: coreClient.CompositeMapper = { - serializedName: - "ApiManagementService_applyNetworkConfigurationUpdatesHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String" + serializedName: + "ApiManagementService_applyNetworkConfigurationUpdatesHeaders", + type: { + name: "Composite", + className: "ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders", + modelProperties: { + location: { + serializedName: "location", + xmlName: "location", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "DiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_getEntityTagHeaders", + type: { + name: "Composite", + className: "DiagnosticGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getHeaders", - type: { - name: "Composite", - className: "DiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_getHeaders", + type: { + name: "Composite", + className: "DiagnosticGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_createOrUpdateHeaders", + type: { + name: "Composite", + className: "DiagnosticCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_updateHeaders", - type: { - name: "Composite", - className: "DiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Diagnostic_updateHeaders", + type: { + name: "Composite", + className: "DiagnosticUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getEntityTagHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_getEntityTagHeaders", + type: { + name: "Composite", + className: "EmailTemplateGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateGetHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_getHeaders", + type: { + name: "Composite", + className: "EmailTemplateGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const EmailTemplateUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_updateHeaders", - type: { - name: "Composite", - className: "EmailTemplateUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "EmailTemplate_updateHeaders", + type: { + name: "Composite", + className: "EmailTemplateUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayGetHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getHeaders", - type: { - name: "Composite", - className: "GatewayGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_getHeaders", + type: { + name: "Composite", + className: "GatewayGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_updateHeaders", - type: { - name: "Composite", - className: "GatewayUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_updateHeaders", + type: { + name: "Composite", + className: "GatewayUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayListKeysHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_listKeysHeaders", - type: { - name: "Composite", - className: "GatewayListKeysHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Gateway_listKeysHeaders", + type: { + name: "Composite", + className: "GatewayListKeysHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationGetHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_getHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_getHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayHostnameConfigurationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayHostnameConfiguration_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayHostnameConfiguration_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayHostnameConfigurationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayApi_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayApi_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayApiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_getEntityTagHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityGetHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_getHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_getHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GatewayCertificateAuthorityCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthority_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GatewayCertificateAuthority_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GatewayCertificateAuthorityCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getEntityTagHeaders", - type: { - name: "Composite", - className: "GroupGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_getEntityTagHeaders", + type: { + name: "Composite", + className: "GroupGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupGetHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getHeaders", - type: { - name: "Composite", - className: "GroupGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_getHeaders", + type: { + name: "Composite", + className: "GroupGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GroupCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GroupCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GroupUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_updateHeaders", - type: { - name: "Composite", - className: "GroupUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Group_updateHeaders", + type: { + name: "Composite", + className: "GroupUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_getEntityTagHeaders", + type: { + name: "Composite", + className: "IdentityProviderGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_getHeaders", + type: { + name: "Composite", + className: "IdentityProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "IdentityProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "IdentityProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_updateHeaders", - type: { - name: "Composite", - className: "IdentityProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_updateHeaders", + type: { + name: "Composite", + className: "IdentityProviderUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IdentityProviderListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "IdentityProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "IdentityProvider_listSecretsHeaders", + type: { + name: "Composite", + className: "IdentityProviderListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const IssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "Issue_getHeaders", - type: { - name: "Composite", - className: "IssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Issue_getHeaders", + type: { + name: "Composite", + className: "IssueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getEntityTagHeaders", - type: { - name: "Composite", - className: "LoggerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_getEntityTagHeaders", + type: { + name: "Composite", + className: "LoggerGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerGetHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getHeaders", - type: { - name: "Composite", - className: "LoggerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_getHeaders", + type: { + name: "Composite", + className: "LoggerGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_createOrUpdateHeaders", - type: { - name: "Composite", - className: "LoggerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_createOrUpdateHeaders", + type: { + name: "Composite", + className: "LoggerCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const LoggerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_updateHeaders", - type: { - name: "Composite", - className: "LoggerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Logger_updateHeaders", + type: { + name: "Composite", + className: "LoggerUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getEntityTagHeaders", - type: { - name: "Composite", - className: "NamedValueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_getEntityTagHeaders", + type: { + name: "Composite", + className: "NamedValueGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueGetHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getHeaders", - type: { - name: "Composite", - className: "NamedValueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_getHeaders", + type: { + name: "Composite", + className: "NamedValueGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "NamedValueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_createOrUpdateHeaders", + type: { + name: "Composite", + className: "NamedValueCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_updateHeaders", - type: { - name: "Composite", - className: "NamedValueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_updateHeaders", + type: { + name: "Composite", + className: "NamedValueUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueListValueHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_listValueHeaders", - type: { - name: "Composite", - className: "NamedValueListValueHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_listValueHeaders", + type: { + name: "Composite", + className: "NamedValueListValueHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const NamedValueRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_refreshSecretHeaders", - type: { - name: "Composite", - className: "NamedValueRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "NamedValue_refreshSecretHeaders", + type: { + name: "Composite", + className: "NamedValueRefreshSecretHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_getEntityTagHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_getHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_getHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_createOrUpdateHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_updateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_updateHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const OpenIdConnectProviderListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "OpenIdConnectProvider_listSecretsHeaders", + type: { + name: "Composite", + className: "OpenIdConnectProviderListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_getEntityTagHeaders", + type: { + name: "Composite", + className: "PolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getHeaders", - type: { - name: "Composite", - className: "PolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_getHeaders", + type: { + name: "Composite", + className: "PolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Policy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_getEntityTagHeaders", + type: { + name: "Composite", + className: "PolicyFragmentGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_getHeaders", + type: { + name: "Composite", + className: "PolicyFragmentGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PolicyFragmentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyFragmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PolicyFragment_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PolicyFragmentCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalConfigGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalConfigGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalConfig_getEntityTagHeaders", + type: { + name: "Composite", + className: "PortalConfigGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalConfigGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getHeaders", - type: { - name: "Composite", - className: "PortalConfigGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalConfig_getHeaders", + type: { + name: "Composite", + className: "PortalConfigGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_getEntityTagHeaders", + type: { + name: "Composite", + className: "PortalRevisionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_getHeaders", + type: { + name: "Composite", + className: "PortalRevisionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PortalRevisionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_createOrUpdateHeaders", + type: { + name: "Composite", + className: "PortalRevisionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const PortalRevisionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_updateHeaders", - type: { - name: "Composite", - className: "PortalRevisionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "PortalRevision_updateHeaders", + type: { + name: "Composite", + className: "PortalRevisionUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignInSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignInSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "SignInSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignInSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignInSettings_getHeaders", + type: { + name: "Composite", + className: "SignInSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignUpSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignUpSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "SignUpSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SignUpSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "SignUpSettings_getHeaders", + type: { + name: "Composite", + className: "SignUpSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DelegationSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "DelegationSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "DelegationSettings_getEntityTagHeaders", + type: { + name: "Composite", + className: "DelegationSettingsGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DelegationSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "DelegationSettings_getHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "DelegationSettings_getHeaders", + type: { + name: "Composite", + className: "DelegationSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductGetHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getHeaders", - type: { - name: "Composite", - className: "ProductGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_getHeaders", + type: { + name: "Composite", + className: "ProductGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_updateHeaders", - type: { - name: "Composite", - className: "ProductUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Product_updateHeaders", + type: { + name: "Composite", + className: "ProductUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductPolicyGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_getHeaders", + type: { + name: "Composite", + className: "ProductPolicyGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductPolicy_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductPolicyCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_getEntityTagHeaders", + type: { + name: "Composite", + className: "ProductWikiGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getHeaders", - type: { - name: "Composite", - className: "ProductWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_getHeaders", + type: { + name: "Composite", + className: "ProductWikiGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_createOrUpdateHeaders", + type: { + name: "Composite", + className: "ProductWikiCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_updateHeaders", - type: { - name: "Composite", - className: "ProductWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWiki_updateHeaders", + type: { + name: "Composite", + className: "ProductWikiUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikisListHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listHeaders", - type: { - name: "Composite", - className: "ProductWikisListHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWikis_listHeaders", + type: { + name: "Composite", + className: "ProductWikisListHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const ProductWikisListNextHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listNextHeaders", - type: { - name: "Composite", - className: "ProductWikisListNextHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "ProductWikis_listNextHeaders", + type: { + name: "Composite", + className: "ProductWikisListNextHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_getEntityTagHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_getHeaders", + type: { + name: "Composite", + className: "GlobalSchemaGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const GlobalSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GlobalSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "GlobalSchema_createOrUpdateHeaders", + type: { + name: "Composite", + className: "GlobalSchemaCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantSettings_getHeaders", - type: { - name: "Composite", - className: "TenantSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantSettings_getHeaders", + type: { + name: "Composite", + className: "TenantSettingsGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getEntityTagHeaders", - type: { - name: "Composite", - className: "SubscriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_getEntityTagHeaders", + type: { + name: "Composite", + className: "SubscriptionGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getHeaders", - type: { - name: "Composite", - className: "SubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_getHeaders", + type: { + name: "Composite", + className: "SubscriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "SubscriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_createOrUpdateHeaders", + type: { + name: "Composite", + className: "SubscriptionCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_updateHeaders", - type: { - name: "Composite", - className: "SubscriptionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_updateHeaders", + type: { + name: "Composite", + className: "SubscriptionUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const SubscriptionListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_listSecretsHeaders", - type: { - name: "Composite", - className: "SubscriptionListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Subscription_listSecretsHeaders", + type: { + name: "Composite", + className: "SubscriptionListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getEntityTagHeaders", - type: { - name: "Composite", - className: "TenantAccessGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_getEntityTagHeaders", + type: { + name: "Composite", + className: "TenantAccessGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getHeaders", - type: { - name: "Composite", - className: "TenantAccessGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_getHeaders", + type: { + name: "Composite", + className: "TenantAccessGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessCreateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_createHeaders", - type: { - name: "Composite", - className: "TenantAccessCreateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_createHeaders", + type: { + name: "Composite", + className: "TenantAccessCreateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_updateHeaders", - type: { - name: "Composite", - className: "TenantAccessUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_updateHeaders", + type: { + name: "Composite", + className: "TenantAccessUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const TenantAccessListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_listSecretsHeaders", - type: { - name: "Composite", - className: "TenantAccessListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "TenantAccess_listSecretsHeaders", + type: { + name: "Composite", + className: "TenantAccessListSecretsHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "User_getEntityTagHeaders", - type: { - name: "Composite", - className: "UserGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_getEntityTagHeaders", + type: { + name: "Composite", + className: "UserGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserGetHeaders: coreClient.CompositeMapper = { - serializedName: "User_getHeaders", - type: { - name: "Composite", - className: "UserGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_getHeaders", + type: { + name: "Composite", + className: "UserGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_createOrUpdateHeaders", - type: { - name: "Composite", - className: "UserCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_createOrUpdateHeaders", + type: { + name: "Composite", + className: "UserCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_updateHeaders", - type: { - name: "Composite", - className: "UserUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "User_updateHeaders", + type: { + name: "Composite", + className: "UserUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const UserSubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "UserSubscription_getHeaders", - type: { - name: "Composite", - className: "UserSubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "UserSubscription_getHeaders", + type: { + name: "Composite", + className: "UserSubscriptionGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getEntityTagHeaders", - type: { - name: "Composite", - className: "DocumentationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_getEntityTagHeaders", + type: { + name: "Composite", + className: "DocumentationGetEntityTagHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getHeaders", - type: { - name: "Composite", - className: "DocumentationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_getHeaders", + type: { + name: "Composite", + className: "DocumentationGetHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DocumentationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" + serializedName: "Documentation_createOrUpdateHeaders", + type: { + name: "Composite", + className: "DocumentationCreateOrUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } } - } } - } }; export const DocumentationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_updateHeaders", - type: { - name: "Composite", - className: "DocumentationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String" - } - } - } - } + serializedName: "Documentation_updateHeaders", + type: { + name: "Composite", + className: "DocumentationUpdateHeaders", + modelProperties: { + eTag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String" + } + } + } + } }; diff --git a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts index 5fbad6e2b16b..ef0cb782a6f1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts @@ -7,1670 +7,1670 @@ */ import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter + OperationParameter, + OperationQueryParameter, + OperationURLParameter } from "@azure/core-client"; import { - ApiCreateOrUpdateParameter as ApiCreateOrUpdateParameterMapper, - ApiUpdateContract as ApiUpdateContractMapper, - ApiReleaseContract as ApiReleaseContractMapper, - OperationContract as OperationContractMapper, - OperationUpdateContract as OperationUpdateContractMapper, - PolicyContract as PolicyContractMapper, - TagCreateUpdateParameters as TagCreateUpdateParametersMapper, - ResolverContract as ResolverContractMapper, - ResolverUpdateContract as ResolverUpdateContractMapper, - SchemaContract as SchemaContractMapper, - DiagnosticContract as DiagnosticContractMapper, - IssueContract as IssueContractMapper, - IssueUpdateContract as IssueUpdateContractMapper, - IssueCommentContract as IssueCommentContractMapper, - IssueAttachmentContract as IssueAttachmentContractMapper, - TagDescriptionCreateParameters as TagDescriptionCreateParametersMapper, - WikiContract as WikiContractMapper, - WikiUpdateContract as WikiUpdateContractMapper, - ApiVersionSetContract as ApiVersionSetContractMapper, - ApiVersionSetUpdateParameters as ApiVersionSetUpdateParametersMapper, - AuthorizationServerContract as AuthorizationServerContractMapper, - AuthorizationServerUpdateContract as AuthorizationServerUpdateContractMapper, - AuthorizationProviderContract as AuthorizationProviderContractMapper, - AuthorizationContract as AuthorizationContractMapper, - AuthorizationConfirmConsentCodeRequestContract as AuthorizationConfirmConsentCodeRequestContractMapper, - AuthorizationLoginRequestContract as AuthorizationLoginRequestContractMapper, - AuthorizationAccessPolicyContract as AuthorizationAccessPolicyContractMapper, - BackendContract as BackendContractMapper, - BackendUpdateParameters as BackendUpdateParametersMapper, - BackendReconnectContract as BackendReconnectContractMapper, - CacheContract as CacheContractMapper, - CacheUpdateParameters as CacheUpdateParametersMapper, - CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper, - ConnectivityCheckRequest as ConnectivityCheckRequestMapper, - ContentTypeContract as ContentTypeContractMapper, - ContentItemContract as ContentItemContractMapper, - ApiManagementServiceBackupRestoreParameters as ApiManagementServiceBackupRestoreParametersMapper, - ApiManagementServiceResource as ApiManagementServiceResourceMapper, - ApiManagementServiceUpdateParameters as ApiManagementServiceUpdateParametersMapper, - ApiManagementServiceCheckNameAvailabilityParameters as ApiManagementServiceCheckNameAvailabilityParametersMapper, - ApiManagementServiceApplyNetworkConfigurationParameters as ApiManagementServiceApplyNetworkConfigurationParametersMapper, - EmailTemplateUpdateParameters as EmailTemplateUpdateParametersMapper, - GatewayContract as GatewayContractMapper, - GatewayKeyRegenerationRequestContract as GatewayKeyRegenerationRequestContractMapper, - GatewayTokenRequestContract as GatewayTokenRequestContractMapper, - GatewayHostnameConfigurationContract as GatewayHostnameConfigurationContractMapper, - AssociationContract as AssociationContractMapper, - GatewayCertificateAuthorityContract as GatewayCertificateAuthorityContractMapper, - GroupCreateParameters as GroupCreateParametersMapper, - GroupUpdateParameters as GroupUpdateParametersMapper, - IdentityProviderCreateContract as IdentityProviderCreateContractMapper, - IdentityProviderUpdateParameters as IdentityProviderUpdateParametersMapper, - LoggerContract as LoggerContractMapper, - LoggerUpdateContract as LoggerUpdateContractMapper, - NamedValueCreateContract as NamedValueCreateContractMapper, - NamedValueUpdateParameters as NamedValueUpdateParametersMapper, - OpenidConnectProviderContract as OpenidConnectProviderContractMapper, - OpenidConnectProviderUpdateContract as OpenidConnectProviderUpdateContractMapper, - PolicyFragmentContract as PolicyFragmentContractMapper, - PortalConfigContract as PortalConfigContractMapper, - PortalRevisionContract as PortalRevisionContractMapper, - PortalSigninSettings as PortalSigninSettingsMapper, - PortalSignupSettings as PortalSignupSettingsMapper, - PortalDelegationSettings as PortalDelegationSettingsMapper, - PrivateEndpointConnectionRequest as PrivateEndpointConnectionRequestMapper, - ProductContract as ProductContractMapper, - ProductUpdateParameters as ProductUpdateParametersMapper, - QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, - GlobalSchemaContract as GlobalSchemaContractMapper, - SubscriptionCreateParameters as SubscriptionCreateParametersMapper, - SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, - AccessInformationCreateParameters as AccessInformationCreateParametersMapper, - AccessInformationUpdateParameters as AccessInformationUpdateParametersMapper, - DeployConfigurationParameters as DeployConfigurationParametersMapper, - SaveConfigurationParameter as SaveConfigurationParameterMapper, - UserCreateParameters as UserCreateParametersMapper, - UserUpdateParameters as UserUpdateParametersMapper, - UserTokenParameters as UserTokenParametersMapper, - DocumentationContract as DocumentationContractMapper, - DocumentationUpdateContract as DocumentationUpdateContractMapper -} from "../models/mappers"; + AccessInformationCreateParameters as AccessInformationCreateParametersMapper, + AccessInformationUpdateParameters as AccessInformationUpdateParametersMapper, + ApiCreateOrUpdateParameter as ApiCreateOrUpdateParameterMapper, + ApiManagementServiceApplyNetworkConfigurationParameters as ApiManagementServiceApplyNetworkConfigurationParametersMapper, + ApiManagementServiceBackupRestoreParameters as ApiManagementServiceBackupRestoreParametersMapper, + ApiManagementServiceCheckNameAvailabilityParameters as ApiManagementServiceCheckNameAvailabilityParametersMapper, + ApiManagementServiceResource as ApiManagementServiceResourceMapper, + ApiManagementServiceUpdateParameters as ApiManagementServiceUpdateParametersMapper, + ApiReleaseContract as ApiReleaseContractMapper, + ApiUpdateContract as ApiUpdateContractMapper, + ApiVersionSetContract as ApiVersionSetContractMapper, + ApiVersionSetUpdateParameters as ApiVersionSetUpdateParametersMapper, + AssociationContract as AssociationContractMapper, + AuthorizationAccessPolicyContract as AuthorizationAccessPolicyContractMapper, + AuthorizationConfirmConsentCodeRequestContract as AuthorizationConfirmConsentCodeRequestContractMapper, + AuthorizationContract as AuthorizationContractMapper, + AuthorizationLoginRequestContract as AuthorizationLoginRequestContractMapper, + AuthorizationProviderContract as AuthorizationProviderContractMapper, + AuthorizationServerContract as AuthorizationServerContractMapper, + AuthorizationServerUpdateContract as AuthorizationServerUpdateContractMapper, + BackendContract as BackendContractMapper, + BackendReconnectContract as BackendReconnectContractMapper, + BackendUpdateParameters as BackendUpdateParametersMapper, + CacheContract as CacheContractMapper, + CacheUpdateParameters as CacheUpdateParametersMapper, + CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper, + ConnectivityCheckRequest as ConnectivityCheckRequestMapper, + ContentItemContract as ContentItemContractMapper, + ContentTypeContract as ContentTypeContractMapper, + DeployConfigurationParameters as DeployConfigurationParametersMapper, + DiagnosticContract as DiagnosticContractMapper, + DocumentationContract as DocumentationContractMapper, + DocumentationUpdateContract as DocumentationUpdateContractMapper, + EmailTemplateUpdateParameters as EmailTemplateUpdateParametersMapper, + GatewayCertificateAuthorityContract as GatewayCertificateAuthorityContractMapper, + GatewayContract as GatewayContractMapper, + GatewayHostnameConfigurationContract as GatewayHostnameConfigurationContractMapper, + GatewayKeyRegenerationRequestContract as GatewayKeyRegenerationRequestContractMapper, + GatewayTokenRequestContract as GatewayTokenRequestContractMapper, + GlobalSchemaContract as GlobalSchemaContractMapper, + GroupCreateParameters as GroupCreateParametersMapper, + GroupUpdateParameters as GroupUpdateParametersMapper, + IdentityProviderCreateContract as IdentityProviderCreateContractMapper, + IdentityProviderUpdateParameters as IdentityProviderUpdateParametersMapper, + IssueAttachmentContract as IssueAttachmentContractMapper, + IssueCommentContract as IssueCommentContractMapper, + IssueContract as IssueContractMapper, + IssueUpdateContract as IssueUpdateContractMapper, + LoggerContract as LoggerContractMapper, + LoggerUpdateContract as LoggerUpdateContractMapper, + NamedValueCreateContract as NamedValueCreateContractMapper, + NamedValueUpdateParameters as NamedValueUpdateParametersMapper, + OpenidConnectProviderContract as OpenidConnectProviderContractMapper, + OpenidConnectProviderUpdateContract as OpenidConnectProviderUpdateContractMapper, + OperationContract as OperationContractMapper, + OperationUpdateContract as OperationUpdateContractMapper, + PolicyContract as PolicyContractMapper, + PolicyFragmentContract as PolicyFragmentContractMapper, + PortalConfigContract as PortalConfigContractMapper, + PortalDelegationSettings as PortalDelegationSettingsMapper, + PortalRevisionContract as PortalRevisionContractMapper, + PortalSigninSettings as PortalSigninSettingsMapper, + PortalSignupSettings as PortalSignupSettingsMapper, + PrivateEndpointConnectionRequest as PrivateEndpointConnectionRequestMapper, + ProductContract as ProductContractMapper, + ProductUpdateParameters as ProductUpdateParametersMapper, + QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, + ResolverContract as ResolverContractMapper, + ResolverUpdateContract as ResolverUpdateContractMapper, + SaveConfigurationParameter as SaveConfigurationParameterMapper, + SchemaContract as SchemaContractMapper, + SubscriptionCreateParameters as SubscriptionCreateParametersMapper, + SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, + TagCreateUpdateParameters as TagCreateUpdateParametersMapper, + TagDescriptionCreateParameters as TagDescriptionCreateParametersMapper, + UserCreateParameters as UserCreateParametersMapper, + UserTokenParameters as UserTokenParametersMapper, + UserUpdateParameters as UserUpdateParametersMapper, + WikiContract as WikiContractMapper, + WikiUpdateContract as WikiUpdateContractMapper +} from "../models/mappers.js"; export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } } - } }; export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - xmlName: "$host", - type: { - name: "String" - } - }, - skipEncoding: true + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + xmlName: "$host", + type: { + name: "String" + } + }, + skipEncoding: true }; export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1 - }, - serializedName: "resourceGroupName", - required: true, - xmlName: "resourceGroupName", - type: { - name: "String" + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + xmlName: "resourceGroupName", + type: { + name: "String" + } } - } }; export const serviceName: OperationURLParameter = { - parameterPath: "serviceName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), - MaxLength: 50, - MinLength: 1 - }, - serializedName: "serviceName", - required: true, - xmlName: "serviceName", - type: { - name: "String" + parameterPath: "serviceName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), + MaxLength: 50, + MinLength: 1 + }, + serializedName: "serviceName", + required: true, + xmlName: "serviceName", + type: { + name: "String" + } } - } }; export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - xmlName: "$filter", - type: { - name: "String" + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + xmlName: "$filter", + type: { + name: "String" + } } - } }; export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - constraints: { - InclusiveMinimum: 1 - }, - serializedName: "$top", - xmlName: "$top", - type: { - name: "Number" + parameterPath: ["options", "top"], + mapper: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "$top", + xmlName: "$top", + type: { + name: "Number" + } } - } }; export const skip: OperationQueryParameter = { - parameterPath: ["options", "skip"], - mapper: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "$skip", - xmlName: "$skip", - type: { - name: "Number" + parameterPath: ["options", "skip"], + mapper: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "$skip", + xmlName: "$skip", + type: { + name: "Number" + } } - } }; export const tags: OperationQueryParameter = { - parameterPath: ["options", "tags"], - mapper: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "String" + parameterPath: ["options", "tags"], + mapper: { + serializedName: "tags", + xmlName: "tags", + type: { + name: "String" + } } - } }; export const expandApiVersionSet: OperationQueryParameter = { - parameterPath: ["options", "expandApiVersionSet"], - mapper: { - serializedName: "expandApiVersionSet", - xmlName: "expandApiVersionSet", - type: { - name: "Boolean" + parameterPath: ["options", "expandApiVersionSet"], + mapper: { + serializedName: "expandApiVersionSet", + xmlName: "expandApiVersionSet", + type: { + name: "Boolean" + } } - } }; export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2022-08-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-08-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } } - } }; export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", - required: true, - xmlName: "subscriptionId", - type: { - name: "String" + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + xmlName: "subscriptionId", + type: { + name: "String" + } } - } }; export const apiId: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String" + parameterPath: "apiId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "apiId", + required: true, + xmlName: "apiId", + type: { + name: "String" + } } - } }; export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } } - } }; export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ApiCreateOrUpdateParameterMapper + parameterPath: "parameters", + mapper: ApiCreateOrUpdateParameterMapper }; export const ifMatch: OperationParameter = { - parameterPath: ["options", "ifMatch"], - mapper: { - serializedName: "If-Match", - xmlName: "If-Match", - type: { - name: "String" + parameterPath: ["options", "ifMatch"], + mapper: { + serializedName: "If-Match", + xmlName: "If-Match", + type: { + name: "String" + } } - } }; export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: ApiUpdateContractMapper + parameterPath: "parameters", + mapper: ApiUpdateContractMapper }; export const ifMatch1: OperationParameter = { - parameterPath: "ifMatch", - mapper: { - serializedName: "If-Match", - required: true, - xmlName: "If-Match", - type: { - name: "String" + parameterPath: "ifMatch", + mapper: { + serializedName: "If-Match", + required: true, + xmlName: "If-Match", + type: { + name: "String" + } } - } }; export const deleteRevisions: OperationQueryParameter = { - parameterPath: ["options", "deleteRevisions"], - mapper: { - serializedName: "deleteRevisions", - xmlName: "deleteRevisions", - type: { - name: "Boolean" + parameterPath: ["options", "deleteRevisions"], + mapper: { + serializedName: "deleteRevisions", + xmlName: "deleteRevisions", + type: { + name: "Boolean" + } } - } }; export const includeNotTaggedApis: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedApis"], - mapper: { - serializedName: "includeNotTaggedApis", - xmlName: "includeNotTaggedApis", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedApis"], + mapper: { + serializedName: "includeNotTaggedApis", + xmlName: "includeNotTaggedApis", + type: { + name: "Boolean" + } } - } }; export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - xmlName: "nextLink", - type: { - name: "String" - } - }, - skipEncoding: true + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + xmlName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true }; export const apiId1: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String" + parameterPath: "apiId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "apiId", + required: true, + xmlName: "apiId", + type: { + name: "String" + } } - } }; export const releaseId: OperationURLParameter = { - parameterPath: "releaseId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "releaseId", - required: true, - xmlName: "releaseId", - type: { - name: "String" + parameterPath: "releaseId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "releaseId", + required: true, + xmlName: "releaseId", + type: { + name: "String" + } } - } }; export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: ApiReleaseContractMapper + parameterPath: "parameters", + mapper: ApiReleaseContractMapper }; export const operationId: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "operationId", - required: true, - xmlName: "operationId", - type: { - name: "String" + parameterPath: "operationId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "operationId", + required: true, + xmlName: "operationId", + type: { + name: "String" + } } - } }; export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: OperationContractMapper + parameterPath: "parameters", + mapper: OperationContractMapper }; export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: OperationUpdateContractMapper + parameterPath: "parameters", + mapper: OperationUpdateContractMapper }; export const policyId: OperationURLParameter = { - parameterPath: "policyId", - mapper: { - serializedName: "policyId", - required: true, - xmlName: "policyId", - type: { - name: "String" + parameterPath: "policyId", + mapper: { + serializedName: "policyId", + required: true, + xmlName: "policyId", + type: { + name: "String" + } } - } }; export const format: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - defaultValue: "xml", - serializedName: "format", - xmlName: "format", - type: { - name: "String" + parameterPath: ["options", "format"], + mapper: { + defaultValue: "xml", + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } } - } }; export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyContractMapper + parameterPath: "parameters", + mapper: PolicyContractMapper }; export const tagId: OperationURLParameter = { - parameterPath: "tagId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "tagId", - required: true, - xmlName: "tagId", - type: { - name: "String" + parameterPath: "tagId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "tagId", + required: true, + xmlName: "tagId", + type: { + name: "String" + } } - } }; export const productId: OperationURLParameter = { - parameterPath: "productId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "productId", - required: true, - xmlName: "productId", - type: { - name: "String" + parameterPath: "productId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "productId", + required: true, + xmlName: "productId", + type: { + name: "String" + } } - } }; export const scope: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String" + parameterPath: ["options", "scope"], + mapper: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "String" + } } - } }; export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: TagCreateUpdateParametersMapper + parameterPath: "parameters", + mapper: TagCreateUpdateParametersMapper }; export const resolverId: OperationURLParameter = { - parameterPath: "resolverId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "resolverId", - required: true, - xmlName: "resolverId", - type: { - name: "String" + parameterPath: "resolverId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "resolverId", + required: true, + xmlName: "resolverId", + type: { + name: "String" + } } - } }; export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverContractMapper + parameterPath: "parameters", + mapper: ResolverContractMapper }; export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverUpdateContractMapper + parameterPath: "parameters", + mapper: ResolverUpdateContractMapper }; export const accept1: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: - "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" + parameterPath: "accept", + mapper: { + defaultValue: + "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } } - } }; export const schemaId: OperationURLParameter = { - parameterPath: "schemaId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "schemaId", - required: true, - xmlName: "schemaId", - type: { - name: "String" + parameterPath: "schemaId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "schemaId", + required: true, + xmlName: "schemaId", + type: { + name: "String" + } } - } }; export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: SchemaContractMapper + parameterPath: "parameters", + mapper: SchemaContractMapper }; export const force: OperationQueryParameter = { - parameterPath: ["options", "force"], - mapper: { - serializedName: "force", - xmlName: "force", - type: { - name: "Boolean" + parameterPath: ["options", "force"], + mapper: { + serializedName: "force", + xmlName: "force", + type: { + name: "Boolean" + } } - } }; export const diagnosticId: OperationURLParameter = { - parameterPath: "diagnosticId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "diagnosticId", - required: true, - xmlName: "diagnosticId", - type: { - name: "String" + parameterPath: "diagnosticId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "diagnosticId", + required: true, + xmlName: "diagnosticId", + type: { + name: "String" + } } - } }; export const parameters10: OperationParameter = { - parameterPath: "parameters", - mapper: DiagnosticContractMapper + parameterPath: "parameters", + mapper: DiagnosticContractMapper }; export const expandCommentsAttachments: OperationQueryParameter = { - parameterPath: ["options", "expandCommentsAttachments"], - mapper: { - serializedName: "expandCommentsAttachments", - xmlName: "expandCommentsAttachments", - type: { - name: "Boolean" + parameterPath: ["options", "expandCommentsAttachments"], + mapper: { + serializedName: "expandCommentsAttachments", + xmlName: "expandCommentsAttachments", + type: { + name: "Boolean" + } } - } }; export const issueId: OperationURLParameter = { - parameterPath: "issueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "issueId", - required: true, - xmlName: "issueId", - type: { - name: "String" + parameterPath: "issueId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "issueId", + required: true, + xmlName: "issueId", + type: { + name: "String" + } } - } }; export const parameters11: OperationParameter = { - parameterPath: "parameters", - mapper: IssueContractMapper + parameterPath: "parameters", + mapper: IssueContractMapper }; export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: IssueUpdateContractMapper + parameterPath: "parameters", + mapper: IssueUpdateContractMapper }; export const commentId: OperationURLParameter = { - parameterPath: "commentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "commentId", - required: true, - xmlName: "commentId", - type: { - name: "String" + parameterPath: "commentId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "commentId", + required: true, + xmlName: "commentId", + type: { + name: "String" + } } - } }; export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: IssueCommentContractMapper + parameterPath: "parameters", + mapper: IssueCommentContractMapper }; export const attachmentId: OperationURLParameter = { - parameterPath: "attachmentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "attachmentId", - required: true, - xmlName: "attachmentId", - type: { - name: "String" + parameterPath: "attachmentId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "attachmentId", + required: true, + xmlName: "attachmentId", + type: { + name: "String" + } } - } }; export const parameters14: OperationParameter = { - parameterPath: "parameters", - mapper: IssueAttachmentContractMapper + parameterPath: "parameters", + mapper: IssueAttachmentContractMapper }; export const tagDescriptionId: OperationURLParameter = { - parameterPath: "tagDescriptionId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "tagDescriptionId", - required: true, - xmlName: "tagDescriptionId", - type: { - name: "String" + parameterPath: "tagDescriptionId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "tagDescriptionId", + required: true, + xmlName: "tagDescriptionId", + type: { + name: "String" + } } - } }; export const parameters15: OperationParameter = { - parameterPath: "parameters", - mapper: TagDescriptionCreateParametersMapper + parameterPath: "parameters", + mapper: TagDescriptionCreateParametersMapper }; export const includeNotTaggedOperations: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedOperations"], - mapper: { - serializedName: "includeNotTaggedOperations", - xmlName: "includeNotTaggedOperations", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedOperations"], + mapper: { + serializedName: "includeNotTaggedOperations", + xmlName: "includeNotTaggedOperations", + type: { + name: "Boolean" + } } - } }; export const parameters16: OperationParameter = { - parameterPath: "parameters", - mapper: WikiContractMapper + parameterPath: "parameters", + mapper: WikiContractMapper }; export const parameters17: OperationParameter = { - parameterPath: "parameters", - mapper: WikiUpdateContractMapper + parameterPath: "parameters", + mapper: WikiUpdateContractMapper }; export const format1: OperationQueryParameter = { - parameterPath: "format", - mapper: { - serializedName: "format", - required: true, - xmlName: "format", - type: { - name: "String" + parameterPath: "format", + mapper: { + serializedName: "format", + required: true, + xmlName: "format", + type: { + name: "String" + } } - } }; export const exportParam: OperationQueryParameter = { - parameterPath: "exportParam", - mapper: { - serializedName: "export", - required: true, - xmlName: "export", - type: { - name: "String" + parameterPath: "exportParam", + mapper: { + serializedName: "export", + required: true, + xmlName: "export", + type: { + name: "String" + } } - } }; export const versionSetId: OperationURLParameter = { - parameterPath: "versionSetId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "versionSetId", - required: true, - xmlName: "versionSetId", - type: { - name: "String" + parameterPath: "versionSetId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "versionSetId", + required: true, + xmlName: "versionSetId", + type: { + name: "String" + } } - } }; export const parameters18: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetContractMapper + parameterPath: "parameters", + mapper: ApiVersionSetContractMapper }; export const parameters19: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetUpdateParametersMapper + parameterPath: "parameters", + mapper: ApiVersionSetUpdateParametersMapper }; export const authsid: OperationURLParameter = { - parameterPath: "authsid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "authsid", - required: true, - xmlName: "authsid", - type: { - name: "String" + parameterPath: "authsid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "authsid", + required: true, + xmlName: "authsid", + type: { + name: "String" + } } - } }; export const parameters20: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerContractMapper + parameterPath: "parameters", + mapper: AuthorizationServerContractMapper }; export const parameters21: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerUpdateContractMapper + parameterPath: "parameters", + mapper: AuthorizationServerUpdateContractMapper }; export const authorizationProviderId: OperationURLParameter = { - parameterPath: "authorizationProviderId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationProviderId", - required: true, - xmlName: "authorizationProviderId", - type: { - name: "String" + parameterPath: "authorizationProviderId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationProviderId", + required: true, + xmlName: "authorizationProviderId", + type: { + name: "String" + } } - } }; export const parameters22: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationProviderContractMapper + parameterPath: "parameters", + mapper: AuthorizationProviderContractMapper }; export const authorizationId: OperationURLParameter = { - parameterPath: "authorizationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationId", - required: true, - xmlName: "authorizationId", - type: { - name: "String" + parameterPath: "authorizationId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationId", + required: true, + xmlName: "authorizationId", + type: { + name: "String" + } } - } }; export const parameters23: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationContractMapper + parameterPath: "parameters", + mapper: AuthorizationContractMapper }; export const parameters24: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationConfirmConsentCodeRequestContractMapper + parameterPath: "parameters", + mapper: AuthorizationConfirmConsentCodeRequestContractMapper }; export const parameters25: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationLoginRequestContractMapper + parameterPath: "parameters", + mapper: AuthorizationLoginRequestContractMapper }; export const authorizationAccessPolicyId: OperationURLParameter = { - parameterPath: "authorizationAccessPolicyId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "authorizationAccessPolicyId", - required: true, - xmlName: "authorizationAccessPolicyId", - type: { - name: "String" + parameterPath: "authorizationAccessPolicyId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "authorizationAccessPolicyId", + required: true, + xmlName: "authorizationAccessPolicyId", + type: { + name: "String" + } } - } }; export const parameters26: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationAccessPolicyContractMapper + parameterPath: "parameters", + mapper: AuthorizationAccessPolicyContractMapper }; export const backendId: OperationURLParameter = { - parameterPath: "backendId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "backendId", - required: true, - xmlName: "backendId", - type: { - name: "String" + parameterPath: "backendId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "backendId", + required: true, + xmlName: "backendId", + type: { + name: "String" + } } - } }; export const parameters27: OperationParameter = { - parameterPath: "parameters", - mapper: BackendContractMapper + parameterPath: "parameters", + mapper: BackendContractMapper }; export const parameters28: OperationParameter = { - parameterPath: "parameters", - mapper: BackendUpdateParametersMapper + parameterPath: "parameters", + mapper: BackendUpdateParametersMapper }; export const parameters29: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: BackendReconnectContractMapper + parameterPath: ["options", "parameters"], + mapper: BackendReconnectContractMapper }; export const cacheId: OperationURLParameter = { - parameterPath: "cacheId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "cacheId", - required: true, - xmlName: "cacheId", - type: { - name: "String" + parameterPath: "cacheId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "cacheId", + required: true, + xmlName: "cacheId", + type: { + name: "String" + } } - } }; export const parameters30: OperationParameter = { - parameterPath: "parameters", - mapper: CacheContractMapper + parameterPath: "parameters", + mapper: CacheContractMapper }; export const parameters31: OperationParameter = { - parameterPath: "parameters", - mapper: CacheUpdateParametersMapper + parameterPath: "parameters", + mapper: CacheUpdateParametersMapper }; export const isKeyVaultRefreshFailed: OperationQueryParameter = { - parameterPath: ["options", "isKeyVaultRefreshFailed"], - mapper: { - serializedName: "isKeyVaultRefreshFailed", - xmlName: "isKeyVaultRefreshFailed", - type: { - name: "Boolean" + parameterPath: ["options", "isKeyVaultRefreshFailed"], + mapper: { + serializedName: "isKeyVaultRefreshFailed", + xmlName: "isKeyVaultRefreshFailed", + type: { + name: "Boolean" + } } - } }; export const certificateId: OperationURLParameter = { - parameterPath: "certificateId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "certificateId", - required: true, - xmlName: "certificateId", - type: { - name: "String" + parameterPath: "certificateId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "certificateId", + required: true, + xmlName: "certificateId", + type: { + name: "String" + } } - } }; export const parameters32: OperationParameter = { - parameterPath: "parameters", - mapper: CertificateCreateOrUpdateParametersMapper + parameterPath: "parameters", + mapper: CertificateCreateOrUpdateParametersMapper }; export const connectivityCheckRequestParams: OperationParameter = { - parameterPath: "connectivityCheckRequestParams", - mapper: ConnectivityCheckRequestMapper + parameterPath: "connectivityCheckRequestParams", + mapper: ConnectivityCheckRequestMapper }; export const contentTypeId: OperationURLParameter = { - parameterPath: "contentTypeId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "contentTypeId", - required: true, - xmlName: "contentTypeId", - type: { - name: "String" + parameterPath: "contentTypeId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "contentTypeId", + required: true, + xmlName: "contentTypeId", + type: { + name: "String" + } } - } }; export const parameters33: OperationParameter = { - parameterPath: "parameters", - mapper: ContentTypeContractMapper + parameterPath: "parameters", + mapper: ContentTypeContractMapper }; export const contentItemId: OperationURLParameter = { - parameterPath: "contentItemId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "contentItemId", - required: true, - xmlName: "contentItemId", - type: { - name: "String" + parameterPath: "contentItemId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "contentItemId", + required: true, + xmlName: "contentItemId", + type: { + name: "String" + } } - } }; export const parameters34: OperationParameter = { - parameterPath: "parameters", - mapper: ContentItemContractMapper + parameterPath: "parameters", + mapper: ContentItemContractMapper }; export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String" + parameterPath: "location", + mapper: { + serializedName: "location", + required: true, + xmlName: "location", + type: { + name: "String" + } } - } }; export const parameters35: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceBackupRestoreParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceBackupRestoreParametersMapper }; export const parameters36: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceResourceMapper + parameterPath: "parameters", + mapper: ApiManagementServiceResourceMapper }; export const parameters37: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceUpdateParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceUpdateParametersMapper }; export const parameters38: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceCheckNameAvailabilityParametersMapper + parameterPath: "parameters", + mapper: ApiManagementServiceCheckNameAvailabilityParametersMapper }; export const parameters39: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: ApiManagementServiceApplyNetworkConfigurationParametersMapper + parameterPath: ["options", "parameters"], + mapper: ApiManagementServiceApplyNetworkConfigurationParametersMapper }; export const templateName: OperationURLParameter = { - parameterPath: "templateName", - mapper: { - serializedName: "templateName", - required: true, - xmlName: "templateName", - type: { - name: "String" + parameterPath: "templateName", + mapper: { + serializedName: "templateName", + required: true, + xmlName: "templateName", + type: { + name: "String" + } } - } }; export const parameters40: OperationParameter = { - parameterPath: "parameters", - mapper: EmailTemplateUpdateParametersMapper + parameterPath: "parameters", + mapper: EmailTemplateUpdateParametersMapper }; export const gatewayId: OperationURLParameter = { - parameterPath: "gatewayId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "gatewayId", - required: true, - xmlName: "gatewayId", - type: { - name: "String" + parameterPath: "gatewayId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "gatewayId", + required: true, + xmlName: "gatewayId", + type: { + name: "String" + } } - } }; export const parameters41: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayContractMapper + parameterPath: "parameters", + mapper: GatewayContractMapper }; export const parameters42: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayKeyRegenerationRequestContractMapper + parameterPath: "parameters", + mapper: GatewayKeyRegenerationRequestContractMapper }; export const parameters43: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayTokenRequestContractMapper + parameterPath: "parameters", + mapper: GatewayTokenRequestContractMapper }; export const hcId: OperationURLParameter = { - parameterPath: "hcId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "hcId", - required: true, - xmlName: "hcId", - type: { - name: "String" + parameterPath: "hcId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "hcId", + required: true, + xmlName: "hcId", + type: { + name: "String" + } } - } }; export const parameters44: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayHostnameConfigurationContractMapper + parameterPath: "parameters", + mapper: GatewayHostnameConfigurationContractMapper }; export const parameters45: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: AssociationContractMapper + parameterPath: ["options", "parameters"], + mapper: AssociationContractMapper }; export const parameters46: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayCertificateAuthorityContractMapper + parameterPath: "parameters", + mapper: GatewayCertificateAuthorityContractMapper }; export const groupId: OperationURLParameter = { - parameterPath: "groupId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "groupId", - required: true, - xmlName: "groupId", - type: { - name: "String" + parameterPath: "groupId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "groupId", + required: true, + xmlName: "groupId", + type: { + name: "String" + } } - } }; export const parameters47: OperationParameter = { - parameterPath: "parameters", - mapper: GroupCreateParametersMapper + parameterPath: "parameters", + mapper: GroupCreateParametersMapper }; export const parameters48: OperationParameter = { - parameterPath: "parameters", - mapper: GroupUpdateParametersMapper + parameterPath: "parameters", + mapper: GroupUpdateParametersMapper }; export const userId: OperationURLParameter = { - parameterPath: "userId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String" + parameterPath: "userId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "userId", + required: true, + xmlName: "userId", + type: { + name: "String" + } } - } }; export const identityProviderName: OperationURLParameter = { - parameterPath: "identityProviderName", - mapper: { - serializedName: "identityProviderName", - required: true, - xmlName: "identityProviderName", - type: { - name: "String" + parameterPath: "identityProviderName", + mapper: { + serializedName: "identityProviderName", + required: true, + xmlName: "identityProviderName", + type: { + name: "String" + } } - } }; export const parameters49: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderCreateContractMapper + parameterPath: "parameters", + mapper: IdentityProviderCreateContractMapper }; export const parameters50: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderUpdateParametersMapper + parameterPath: "parameters", + mapper: IdentityProviderUpdateParametersMapper }; export const loggerId: OperationURLParameter = { - parameterPath: "loggerId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "loggerId", - required: true, - xmlName: "loggerId", - type: { - name: "String" + parameterPath: "loggerId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "loggerId", + required: true, + xmlName: "loggerId", + type: { + name: "String" + } } - } }; export const parameters51: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerContractMapper + parameterPath: "parameters", + mapper: LoggerContractMapper }; export const parameters52: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerUpdateContractMapper + parameterPath: "parameters", + mapper: LoggerUpdateContractMapper }; export const namedValueId: OperationURLParameter = { - parameterPath: "namedValueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "namedValueId", - required: true, - xmlName: "namedValueId", - type: { - name: "String" + parameterPath: "namedValueId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "namedValueId", + required: true, + xmlName: "namedValueId", + type: { + name: "String" + } } - } }; export const parameters53: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueCreateContractMapper + parameterPath: "parameters", + mapper: NamedValueCreateContractMapper }; export const parameters54: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueUpdateParametersMapper + parameterPath: "parameters", + mapper: NamedValueUpdateParametersMapper }; export const locationName: OperationURLParameter = { - parameterPath: "locationName", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "locationName", - required: true, - xmlName: "locationName", - type: { - name: "String" + parameterPath: "locationName", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "locationName", + required: true, + xmlName: "locationName", + type: { + name: "String" + } } - } }; export const notificationName: OperationURLParameter = { - parameterPath: "notificationName", - mapper: { - serializedName: "notificationName", - required: true, - xmlName: "notificationName", - type: { - name: "String" + parameterPath: "notificationName", + mapper: { + serializedName: "notificationName", + required: true, + xmlName: "notificationName", + type: { + name: "String" + } } - } }; export const email: OperationURLParameter = { - parameterPath: "email", - mapper: { - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String" + parameterPath: "email", + mapper: { + serializedName: "email", + required: true, + xmlName: "email", + type: { + name: "String" + } } - } }; export const opid: OperationURLParameter = { - parameterPath: "opid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "opid", - required: true, - xmlName: "opid", - type: { - name: "String" + parameterPath: "opid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "opid", + required: true, + xmlName: "opid", + type: { + name: "String" + } } - } }; export const parameters55: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderContractMapper + parameterPath: "parameters", + mapper: OpenidConnectProviderContractMapper }; export const parameters56: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderUpdateContractMapper + parameterPath: "parameters", + mapper: OpenidConnectProviderUpdateContractMapper }; export const scope1: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "Enum", - allowedValues: ["Tenant", "Product", "Api", "Operation", "All"] + parameterPath: ["options", "scope"], + mapper: { + serializedName: "scope", + xmlName: "scope", + type: { + name: "Enum", + allowedValues: ["Tenant", "Product", "Api", "Operation", "All"] + } } - } }; export const orderby: OperationQueryParameter = { - parameterPath: ["options", "orderby"], - mapper: { - serializedName: "$orderby", - xmlName: "$orderby", - type: { - name: "String" + parameterPath: ["options", "orderby"], + mapper: { + serializedName: "$orderby", + xmlName: "$orderby", + type: { + name: "String" + } } - } }; export const id: OperationURLParameter = { - parameterPath: "id", - mapper: { - constraints: { - Pattern: new RegExp("(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)"), - MaxLength: 80, - MinLength: 1 - }, - serializedName: "id", - required: true, - xmlName: "id", - type: { - name: "String" + parameterPath: "id", + mapper: { + constraints: { + Pattern: new RegExp("(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "id", + required: true, + xmlName: "id", + type: { + name: "String" + } } - } }; export const format2: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - serializedName: "format", - xmlName: "format", - type: { - name: "String" + parameterPath: ["options", "format"], + mapper: { + serializedName: "format", + xmlName: "format", + type: { + name: "String" + } } - } }; export const parameters57: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyFragmentContractMapper + parameterPath: "parameters", + mapper: PolicyFragmentContractMapper }; export const portalConfigId: OperationURLParameter = { - parameterPath: "portalConfigId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1 - }, - serializedName: "portalConfigId", - required: true, - xmlName: "portalConfigId", - type: { - name: "String" + parameterPath: "portalConfigId", + mapper: { + constraints: { + MaxLength: 80, + MinLength: 1 + }, + serializedName: "portalConfigId", + required: true, + xmlName: "portalConfigId", + type: { + name: "String" + } } - } }; export const parameters58: OperationParameter = { - parameterPath: "parameters", - mapper: PortalConfigContractMapper + parameterPath: "parameters", + mapper: PortalConfigContractMapper }; export const portalRevisionId: OperationURLParameter = { - parameterPath: "portalRevisionId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1 - }, - serializedName: "portalRevisionId", - required: true, - xmlName: "portalRevisionId", - type: { - name: "String" + parameterPath: "portalRevisionId", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "portalRevisionId", + required: true, + xmlName: "portalRevisionId", + type: { + name: "String" + } } - } }; export const parameters59: OperationParameter = { - parameterPath: "parameters", - mapper: PortalRevisionContractMapper + parameterPath: "parameters", + mapper: PortalRevisionContractMapper }; export const parameters60: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSigninSettingsMapper + parameterPath: "parameters", + mapper: PortalSigninSettingsMapper }; export const parameters61: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSignupSettingsMapper + parameterPath: "parameters", + mapper: PortalSignupSettingsMapper }; export const parameters62: OperationParameter = { - parameterPath: "parameters", - mapper: PortalDelegationSettingsMapper + parameterPath: "parameters", + mapper: PortalDelegationSettingsMapper }; export const privateEndpointConnectionName: OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", - mapper: { - serializedName: "privateEndpointConnectionName", - required: true, - xmlName: "privateEndpointConnectionName", - type: { - name: "String" + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + xmlName: "privateEndpointConnectionName", + type: { + name: "String" + } } - } }; export const privateEndpointConnectionRequest: OperationParameter = { - parameterPath: "privateEndpointConnectionRequest", - mapper: PrivateEndpointConnectionRequestMapper + parameterPath: "privateEndpointConnectionRequest", + mapper: PrivateEndpointConnectionRequestMapper }; export const privateLinkSubResourceName: OperationURLParameter = { - parameterPath: "privateLinkSubResourceName", - mapper: { - serializedName: "privateLinkSubResourceName", - required: true, - xmlName: "privateLinkSubResourceName", - type: { - name: "String" + parameterPath: "privateLinkSubResourceName", + mapper: { + serializedName: "privateLinkSubResourceName", + required: true, + xmlName: "privateLinkSubResourceName", + type: { + name: "String" + } } - } }; export const expandGroups: OperationQueryParameter = { - parameterPath: ["options", "expandGroups"], - mapper: { - serializedName: "expandGroups", - xmlName: "expandGroups", - type: { - name: "Boolean" + parameterPath: ["options", "expandGroups"], + mapper: { + serializedName: "expandGroups", + xmlName: "expandGroups", + type: { + name: "Boolean" + } } - } }; export const parameters63: OperationParameter = { - parameterPath: "parameters", - mapper: ProductContractMapper + parameterPath: "parameters", + mapper: ProductContractMapper }; export const parameters64: OperationParameter = { - parameterPath: "parameters", - mapper: ProductUpdateParametersMapper + parameterPath: "parameters", + mapper: ProductUpdateParametersMapper }; export const deleteSubscriptions: OperationQueryParameter = { - parameterPath: ["options", "deleteSubscriptions"], - mapper: { - serializedName: "deleteSubscriptions", - xmlName: "deleteSubscriptions", - type: { - name: "Boolean" + parameterPath: ["options", "deleteSubscriptions"], + mapper: { + serializedName: "deleteSubscriptions", + xmlName: "deleteSubscriptions", + type: { + name: "Boolean" + } } - } }; export const includeNotTaggedProducts: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedProducts"], - mapper: { - serializedName: "includeNotTaggedProducts", - xmlName: "includeNotTaggedProducts", - type: { - name: "Boolean" + parameterPath: ["options", "includeNotTaggedProducts"], + mapper: { + serializedName: "includeNotTaggedProducts", + xmlName: "includeNotTaggedProducts", + type: { + name: "Boolean" + } } - } }; export const quotaCounterKey: OperationURLParameter = { - parameterPath: "quotaCounterKey", - mapper: { - serializedName: "quotaCounterKey", - required: true, - xmlName: "quotaCounterKey", - type: { - name: "String" + parameterPath: "quotaCounterKey", + mapper: { + serializedName: "quotaCounterKey", + required: true, + xmlName: "quotaCounterKey", + type: { + name: "String" + } } - } }; export const parameters65: OperationParameter = { - parameterPath: "parameters", - mapper: QuotaCounterValueUpdateContractMapper + parameterPath: "parameters", + mapper: QuotaCounterValueUpdateContractMapper }; export const quotaPeriodKey: OperationURLParameter = { - parameterPath: "quotaPeriodKey", - mapper: { - serializedName: "quotaPeriodKey", - required: true, - xmlName: "quotaPeriodKey", - type: { - name: "String" + parameterPath: "quotaPeriodKey", + mapper: { + serializedName: "quotaPeriodKey", + required: true, + xmlName: "quotaPeriodKey", + type: { + name: "String" + } } - } }; export const filter1: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - xmlName: "$filter", - type: { - name: "String" + parameterPath: "filter", + mapper: { + serializedName: "$filter", + required: true, + xmlName: "$filter", + type: { + name: "String" + } } - } }; export const interval: OperationQueryParameter = { - parameterPath: "interval", - mapper: { - serializedName: "interval", - required: true, - xmlName: "interval", - type: { - name: "TimeSpan" + parameterPath: "interval", + mapper: { + serializedName: "interval", + required: true, + xmlName: "interval", + type: { + name: "TimeSpan" + } } - } }; export const parameters66: OperationParameter = { - parameterPath: "parameters", - mapper: GlobalSchemaContractMapper + parameterPath: "parameters", + mapper: GlobalSchemaContractMapper }; export const settingsType: OperationURLParameter = { - parameterPath: "settingsType", - mapper: { - serializedName: "settingsType", - required: true, - xmlName: "settingsType", - type: { - name: "String" + parameterPath: "settingsType", + mapper: { + serializedName: "settingsType", + required: true, + xmlName: "settingsType", + type: { + name: "String" + } } - } }; export const sid: OperationURLParameter = { - parameterPath: "sid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256 - }, - serializedName: "sid", - required: true, - xmlName: "sid", - type: { - name: "String" + parameterPath: "sid", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256 + }, + serializedName: "sid", + required: true, + xmlName: "sid", + type: { + name: "String" + } } - } }; export const parameters67: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionCreateParametersMapper + parameterPath: "parameters", + mapper: SubscriptionCreateParametersMapper }; export const notify: OperationQueryParameter = { - parameterPath: ["options", "notify"], - mapper: { - serializedName: "notify", - xmlName: "notify", - type: { - name: "Boolean" + parameterPath: ["options", "notify"], + mapper: { + serializedName: "notify", + xmlName: "notify", + type: { + name: "Boolean" + } } - } }; export const appType: OperationQueryParameter = { - parameterPath: ["options", "appType"], - mapper: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String" + parameterPath: ["options", "appType"], + mapper: { + serializedName: "appType", + xmlName: "appType", + type: { + name: "String" + } } - } }; export const parameters68: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionUpdateParametersMapper + parameterPath: "parameters", + mapper: SubscriptionUpdateParametersMapper }; export const accessName: OperationURLParameter = { - parameterPath: "accessName", - mapper: { - serializedName: "accessName", - required: true, - xmlName: "accessName", - type: { - name: "String" + parameterPath: "accessName", + mapper: { + serializedName: "accessName", + required: true, + xmlName: "accessName", + type: { + name: "String" + } } - } }; export const parameters69: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationCreateParametersMapper + parameterPath: "parameters", + mapper: AccessInformationCreateParametersMapper }; export const parameters70: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationUpdateParametersMapper + parameterPath: "parameters", + mapper: AccessInformationUpdateParametersMapper }; export const parameters71: OperationParameter = { - parameterPath: "parameters", - mapper: DeployConfigurationParametersMapper + parameterPath: "parameters", + mapper: DeployConfigurationParametersMapper }; export const configurationName: OperationURLParameter = { - parameterPath: "configurationName", - mapper: { - serializedName: "configurationName", - required: true, - xmlName: "configurationName", - type: { - name: "String" + parameterPath: "configurationName", + mapper: { + serializedName: "configurationName", + required: true, + xmlName: "configurationName", + type: { + name: "String" + } } - } }; export const parameters72: OperationParameter = { - parameterPath: "parameters", - mapper: SaveConfigurationParameterMapper + parameterPath: "parameters", + mapper: SaveConfigurationParameterMapper }; export const parameters73: OperationParameter = { - parameterPath: "parameters", - mapper: UserCreateParametersMapper + parameterPath: "parameters", + mapper: UserCreateParametersMapper }; export const parameters74: OperationParameter = { - parameterPath: "parameters", - mapper: UserUpdateParametersMapper + parameterPath: "parameters", + mapper: UserUpdateParametersMapper }; export const parameters75: OperationParameter = { - parameterPath: "parameters", - mapper: UserTokenParametersMapper + parameterPath: "parameters", + mapper: UserTokenParametersMapper }; export const documentationId: OperationURLParameter = { - parameterPath: "documentationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1 - }, - serializedName: "documentationId", - required: true, - xmlName: "documentationId", - type: { - name: "String" + parameterPath: "documentationId", + mapper: { + constraints: { + Pattern: new RegExp("^[^*#&+:<>?]+$"), + MaxLength: 256, + MinLength: 1 + }, + serializedName: "documentationId", + required: true, + xmlName: "documentationId", + type: { + name: "String" + } } - } }; export const parameters76: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationContractMapper + parameterPath: "parameters", + mapper: DocumentationContractMapper }; export const parameters77: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationUpdateContractMapper + parameterPath: "parameters", + mapper: DocumentationUpdateContractMapper }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts b/sdk/apimanagement/arm-apimanagement/src/operations/api.ts index c1635689c9a8..2330d1933bdc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/api.ts @@ -6,723 +6,723 @@ * 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 { Api } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - ApiContract, - ApiListByServiceNextOptionalParams, - ApiListByServiceOptionalParams, - ApiListByServiceResponse, - TagResourceContract, - ApiListByTagsNextOptionalParams, - ApiListByTagsOptionalParams, - ApiListByTagsResponse, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams, - ApiListByServiceNextResponse, - ApiListByTagsNextResponse -} from "../models"; + ApiContract, + ApiCreateOrUpdateOptionalParams, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateResponse, + ApiDeleteOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetEntityTagResponse, + ApiGetOptionalParams, + ApiGetResponse, + ApiListByServiceNextOptionalParams, + ApiListByServiceNextResponse, + ApiListByServiceOptionalParams, + ApiListByServiceResponse, + ApiListByTagsNextOptionalParams, + ApiListByTagsNextResponse, + ApiListByTagsOptionalParams, + ApiListByTagsResponse, + ApiUpdateContract, + ApiUpdateOptionalParams, + ApiUpdateResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Api } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Api operations. */ export class ApiImpl implements Api { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Api class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Api class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - 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."); + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + 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.listByTagsPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getOperationSpec + ); + } - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiCreateOrUpdateResponse + > + > { + 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, serviceName, apiId, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, apiId, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + apiId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Update Contract parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByTagsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandApiVersionSet, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.expandApiVersionSet, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiContract, + headersMapper: Mappers.ApiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedApis - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedApis + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts index 7f8a30b7977e..40fcc6dc3719 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts @@ -6,499 +6,499 @@ * 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 { ApiDiagnostic } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DiagnosticContract, - ApiDiagnosticListByServiceNextOptionalParams, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticListByServiceResponse, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams, - ApiDiagnosticListByServiceNextResponse -} from "../models"; + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateResponse, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetEntityTagResponse, + ApiDiagnosticGetOptionalParams, + ApiDiagnosticGetResponse, + ApiDiagnosticListByServiceNextOptionalParams, + ApiDiagnosticListByServiceNextResponse, + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticListByServiceResponse, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticUpdateResponse, + DiagnosticContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiDiagnostic } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiDiagnostic operations. */ export class ApiDiagnosticImpl implements ApiDiagnostic { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiDiagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiDiagnostic class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiDiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiDiagnosticListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, options }, + getOperationSpec + ); + } - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Diagnostic for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Diagnostic from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiDiagnosticListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiDiagnosticListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiDiagnosticGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiDiagnosticGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.ApiDiagnosticUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts index c87591913545..675a86c5e2f1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts @@ -6,83 +6,83 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiExport } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse -} from "../models"; + ApiExportGetOptionalParams, + ApiExportGetResponse, + ExportApi, + ExportFormat +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiExport } from "../operationsInterfaces/index.js"; /** Class containing ApiExport operations. */ export class ApiExportImpl implements ApiExport { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiExport class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiExport class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, format, exportParam, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API specified by its identifier in the format specified to the Storage Blob + * with SAS Key valid for 5 minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 + * minutes. + * @param exportParam Query parameter required to export the API details. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, format, exportParam, options }, + getOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiExportResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiExportResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.format1, - Parameters.exportParam - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.apiVersion, + Parameters.format1, + Parameters.exportParam + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts index 527cad10dd31..d2f374389bc7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts @@ -6,492 +6,492 @@ * 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 { ApiIssue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueContract, - ApiIssueListByServiceNextOptionalParams, - ApiIssueListByServiceOptionalParams, - ApiIssueListByServiceResponse, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams, - ApiIssueListByServiceNextResponse -} from "../models"; + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueCreateOrUpdateResponse, + ApiIssueDeleteOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetEntityTagResponse, + ApiIssueGetOptionalParams, + ApiIssueGetResponse, + ApiIssueListByServiceNextOptionalParams, + ApiIssueListByServiceNextResponse, + ApiIssueListByServiceOptionalParams, + ApiIssueListByServiceResponse, + ApiIssueUpdateOptionalParams, + ApiIssueUpdateResponse, + IssueContract, + IssueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssue operations. */ export class ApiIssueImpl implements ApiIssue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + getOperationSpec + ); + } - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Issue for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing issue for an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Issue from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiIssueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiIssueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.expandCommentsAttachments - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.expandCommentsAttachments + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.expandCommentsAttachments - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.apiVersion, + Parameters.expandCommentsAttachments + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.ApiIssueUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts index b4e477407b59..40c723a37fa2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts @@ -6,463 +6,463 @@ * 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 { ApiIssueAttachment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceNextOptionalParams, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentListByServiceResponse, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams, - ApiIssueAttachmentListByServiceNextResponse -} from "../models"; + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentCreateOrUpdateResponse, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetEntityTagResponse, + ApiIssueAttachmentGetOptionalParams, + ApiIssueAttachmentGetResponse, + ApiIssueAttachmentListByServiceNextOptionalParams, + ApiIssueAttachmentListByServiceNextResponse, + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentListByServiceResponse, + IssueAttachmentContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssueAttachment } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssueAttachment operations. */ export class ApiIssueAttachmentImpl implements ApiIssueAttachment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssueAttachment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssueAttachment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + issueId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueAttachmentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueAttachmentListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + issueId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + issueId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options + )) { + yield* page; + } } - } - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, + getOperationSpec + ); + } - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Attachment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueAttachmentListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + nextLink: string, + options?: ApiIssueAttachmentListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueAttachmentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueAttachmentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueAttachmentContract, + headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters14, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.attachmentId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueAttachmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts index a7449a1a1e67..472cae8e911f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts @@ -6,463 +6,463 @@ * 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 { ApiIssueComment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueCommentContract, - ApiIssueCommentListByServiceNextOptionalParams, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentListByServiceResponse, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams, - ApiIssueCommentListByServiceNextResponse -} from "../models"; + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentCreateOrUpdateResponse, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetEntityTagResponse, + ApiIssueCommentGetOptionalParams, + ApiIssueCommentGetResponse, + ApiIssueCommentListByServiceNextOptionalParams, + ApiIssueCommentListByServiceNextResponse, + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentListByServiceResponse, + IssueCommentContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiIssueComment } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiIssueComment operations. */ export class ApiIssueCommentImpl implements ApiIssueComment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiIssueComment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiIssueComment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + issueId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiIssueCommentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiIssueCommentListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + issueId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + issueId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + issueId, + options + )) { + yield* page; + } } - } - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, commentId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, commentId, options }, + getOperationSpec + ); + } - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Comment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueCommentListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + nextLink: string, + options?: ApiIssueCommentListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueCommentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiIssueCommentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IssueCommentContract, + headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.issueId, + Parameters.commentId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCommentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts index a5f8d7391fd4..f19e0970020a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts @@ -6,144 +6,144 @@ * 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 { ApiManagementOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - Operation, - ApiManagementOperationsListNextOptionalParams, - ApiManagementOperationsListOptionalParams, - ApiManagementOperationsListResponse, - ApiManagementOperationsListNextResponse -} from "../models"; + ApiManagementOperationsListNextOptionalParams, + ApiManagementOperationsListNextResponse, + ApiManagementOperationsListOptionalParams, + ApiManagementOperationsListResponse, + Operation +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementOperations } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementOperations operations. */ export class ApiManagementOperationsImpl implements ApiManagementOperations { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - public list( - options?: ApiManagementOperationsListOptionalParams - ): 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); - } - }; - } + /** + * Initialize a new instance of the class ApiManagementOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - options?: ApiManagementOperationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementOperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + public list( + options?: ApiManagementOperationsListOptionalParams + ): 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); + } + }; } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + options?: ApiManagementOperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementOperationsListResponse; + 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?: ApiManagementOperationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + private async *listPagingAll( + options?: ApiManagementOperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } - } - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementOperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementOperationsListOptionalParams + ): 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?: ApiManagementOperationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementOperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ApiManagement/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult + path: "/providers/Microsoft.ApiManagement/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts index 874d5245fd79..c7cc0ede7af8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts @@ -6,1350 +6,1350 @@ * 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 { ApiManagementService } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupNextOptionalParams, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListByResourceGroupResponse, - ApiManagementServiceListNextOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceListResponse, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - ApiManagementServiceListByResourceGroupNextResponse, - ApiManagementServiceListNextResponse -} from "../models"; + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceBackupResponse, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceCheckNameAvailabilityResponse, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateResponse, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierResponse, + ApiManagementServiceGetOptionalParams, + ApiManagementServiceGetResponse, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceGetSsoTokenResponse, + ApiManagementServiceListByResourceGroupNextOptionalParams, + ApiManagementServiceListByResourceGroupNextResponse, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceListByResourceGroupResponse, + ApiManagementServiceListNextOptionalParams, + ApiManagementServiceListNextResponse, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListResponse, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceMigrateToStv2Response, + ApiManagementServiceResource, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceRestoreResponse, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementService } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementService operations. */ export class ApiManagementServiceImpl implements ApiManagementService { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementService class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management services within a 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?: ApiManagementServiceListByResourceGroupOptionalParams - ): 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 readonly client: ApiManagementClient; - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Initialize a new instance of the class ApiManagementService class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; } - 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?: ApiManagementServiceListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; + /** + * List all API Management services within a 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?: ApiManagementServiceListByResourceGroupOptionalParams + ): 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 + ); + } + }; } - } - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementServiceListOptionalParams - ): 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."); + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceListByResourceGroupResponse; + 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; } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: ApiManagementServiceListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceListResponse; - 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 *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } - } - private async *listPagingAll( - options?: ApiManagementServiceListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + public list( + options?: ApiManagementServiceListOptionalParams + ): 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); + } + }; } - } - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - > { - 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 + private async *listPagingPage( + options?: ApiManagementServiceListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } - }; - }; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: restoreOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceRestoreResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + private async *listPagingAll( + options?: ApiManagementServiceListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise { - const poller = await this.beginRestore( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + async beginRestore( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceRestoreResponse + > + > { + 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() + } + }; + }; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - > { - 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, serviceName, parameters, options }, + spec: restoreOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceRestoreResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: backupOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceBackupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + async beginRestoreAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise { + const poller = await this.beginRestore( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise { - const poller = await this.beginBackup( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + async beginBackup( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceBackupResponse + > + > { + 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() + } + }; + }; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - > { - 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, serviceName, parameters, options }, + spec: backupOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceBackupResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + async beginBackupAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise { + const poller = await this.beginBackup( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceCreateOrUpdateResponse + > + > { + 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() + } + }; + }; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - > { - 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, serviceName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceUpdateResponse + > + > { + 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() + } + }; + }; - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): 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() - } - }; - }; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + parameters, + options + ); + return poller.pollUntilDone(); + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + /** + * Gets an API Management service resource description. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): 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() + } + }; + }; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - > { - 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, serviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: migrateToStv2OperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceMigrateToStv2Response, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise { - const poller = await this.beginMigrateToStv2( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginMigrateToStv2( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceMigrateToStv2Response + > + > { + 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() + } + }; + }; - /** - * List all API Management services within a 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?: ApiManagementServiceListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: migrateToStv2OperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceMigrateToStv2Response, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementServiceListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginMigrateToStv2AndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise { + const poller = await this.beginMigrateToStv2( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getSsoTokenOperationSpec - ); - } + /** + * List all API Management services within a 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?: ApiManagementServiceListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { parameters, options }, - checkNameAvailabilityOperationSpec - ); - } + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementServiceListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - getDomainOwnershipIdentifierOperationSpec - ); - } + /** + * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getSsoToken( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getSsoTokenOperationSpec + ); + } - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - >, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - > { - 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() - } - }; - }; + /** + * Checks availability and correctness of a name for an API Management service. + * @param parameters Parameters supplied to the CheckNameAvailability operation. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkNameAvailabilityOperationSpec + ); + } - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: applyNetworkConfigurationUpdatesOperationSpec - }); - const poller = await createHttpPoller< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + /** + * Get the custom domain ownership identifier for an API Management service. + * @param options The options parameters. + */ + getDomainOwnershipIdentifier( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + getDomainOwnershipIdentifierOperationSpec + ); + } - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise { - const poller = await this.beginApplyNetworkConfigurationUpdates( - resourceGroupName, - serviceName, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginApplyNetworkConfigurationUpdates( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + >, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + > { + 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() + } + }; + }; - /** - * 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?: ApiManagementServiceListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: applyNetworkConfigurationUpdatesOperationSpec + }); + const poller = await createHttpPoller< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementServiceListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + async beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise { + const poller = await this.beginApplyNetworkConfigurationUpdates( + resourceGroupName, + serviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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?: ApiManagementServiceListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementServiceListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const restoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters35, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const backupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters35, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters36, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters36, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters37, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const migrateToStv2OperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const getSsoTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceGetSsoTokenResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceGetSsoTokenResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceNameAvailabilityResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceNameAvailabilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters38, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getDomainOwnershipIdentifierOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceGetDomainOwnershipIdentifierResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceGetDomainOwnershipIdentifierResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const applyNetworkConfigurationUpdatesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 201: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 202: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + 204: { + bodyMapper: Mappers.ApiManagementServiceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters39, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters39, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementServiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts index 4c96ac12b9bf..5888d70bd463 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts @@ -6,198 +6,198 @@ * 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 { ApiManagementServiceSkus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusResponse, - ApiManagementServiceSkusListAvailableServiceSkusNextResponse -} from "../models"; + ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, + ApiManagementServiceSkusListAvailableServiceSkusNextResponse, + ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ApiManagementServiceSkusListAvailableServiceSkusResponse, + ResourceSkuResult +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementServiceSkus } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementServiceSkus operations. */ export class ApiManagementServiceSkusImpl implements ApiManagementServiceSkus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementServiceSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiManagementServiceSkus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listAvailableServiceSkusPagingAll( - resourceGroupName, - serviceName, - 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.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableServiceSkusPagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listAvailableServiceSkusPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementServiceSkusListAvailableServiceSkusResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAvailableServiceSkus( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listAvailableServiceSkusPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listAvailableServiceSkusNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listAvailableServiceSkusPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementServiceSkusListAvailableServiceSkusResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAvailableServiceSkus( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAvailableServiceSkusNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listAvailableServiceSkusPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listAvailableServiceSkusPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableServiceSkusPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listAvailableServiceSkusOperationSpec - ); - } + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listAvailableServiceSkusOperationSpec + ); + } - /** - * ListAvailableServiceSkusNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListAvailableServiceSkus - * method. - * @param options The options parameters. - */ - private _listAvailableServiceSkusNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listAvailableServiceSkusNextOperationSpec - ); - } + /** + * ListAvailableServiceSkusNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListAvailableServiceSkus + * method. + * @param options The options parameters. + */ + private _listAvailableServiceSkusNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listAvailableServiceSkusNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listAvailableServiceSkusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listAvailableServiceSkusNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResourceSkuResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts index fa148734690f..15c59f8042d0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts @@ -6,149 +6,149 @@ * 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 { ApiManagementSkus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiManagementSku, - ApiManagementSkusListNextOptionalParams, - ApiManagementSkusListOptionalParams, - ApiManagementSkusListResponse, - ApiManagementSkusListNextResponse -} from "../models"; + ApiManagementSku, + ApiManagementSkusListNextOptionalParams, + ApiManagementSkusListNextResponse, + ApiManagementSkusListOptionalParams, + ApiManagementSkusListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiManagementSkus } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiManagementSkus operations. */ export class ApiManagementSkusImpl implements ApiManagementSkus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiManagementSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementSkusListOptionalParams - ): 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); - } - }; - } + /** + * Initialize a new instance of the class ApiManagementSkus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - options?: ApiManagementSkusListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiManagementSkusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + public list( + options?: ApiManagementSkusListOptionalParams + ): 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); + } + }; } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + options?: ApiManagementSkusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiManagementSkusListResponse; + 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?: ApiManagementSkusListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; + private async *listPagingAll( + options?: ApiManagementSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } - } - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementSkusListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + private _list( + options?: ApiManagementSkusListOptionalParams + ): 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?: ApiManagementSkusListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ApiManagementSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementSkusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiManagementSkusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts index 719e17d32e77..133b04440537 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts @@ -6,509 +6,509 @@ * 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 { ApiOperation } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OperationContract, - ApiOperationListByApiNextOptionalParams, - ApiOperationListByApiOptionalParams, - ApiOperationListByApiResponse, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams, - ApiOperationListByApiNextResponse -} from "../models"; + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationCreateOrUpdateResponse, + ApiOperationDeleteOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetEntityTagResponse, + ApiOperationGetOptionalParams, + ApiOperationGetResponse, + ApiOperationListByApiNextOptionalParams, + ApiOperationListByApiNextResponse, + ApiOperationListByApiOptionalParams, + ApiOperationListByApiResponse, + ApiOperationUpdateOptionalParams, + ApiOperationUpdateResponse, + OperationContract, + OperationUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiOperation } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiOperation operations. */ export class ApiOperationImpl implements ApiOperation { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiOperation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiOperation class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiOperationListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiOperationListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the API Operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + getOperationSpec + ); + } - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new operation in the API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the operation in the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Operation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified operation in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiOperationListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiOperationListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiOperationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.OperationContract, + headersMapper: Mappers.ApiOperationUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts index 5bec2b5db52c..4ed114e6493e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts @@ -6,316 +6,316 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiOperationPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams -} from "../models"; + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyCreateOrUpdateResponse, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetEntityTagResponse, + ApiOperationPolicyGetOptionalParams, + ApiOperationPolicyGetResponse, + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyListByOperationResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiOperationPolicy } from "../operationsInterfaces/index.js"; /** Class containing ApiOperationPolicy operations. */ export class ApiOperationPolicyImpl implements ApiOperationPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiOperationPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiOperationPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec - ); - } + /** + * Get the list of policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + listByOperationOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API operation policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Api Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiOperationPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts index 763231e75669..521d78a5f001 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts @@ -6,280 +6,280 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams -} from "../models"; + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyCreateOrUpdateResponse, + ApiPolicyDeleteOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetEntityTagResponse, + ApiPolicyGetOptionalParams, + ApiPolicyGetResponse, + ApiPolicyListByApiOptionalParams, + ApiPolicyListByApiResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiPolicy } from "../operationsInterfaces/index.js"; /** Class containing ApiPolicy operations. */ export class ApiPolicyImpl implements ApiPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the API policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept1], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept1], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts index b9a226a7aadb..78e05b876b86 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts @@ -6,217 +6,217 @@ * 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 { ApiProduct } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductContract, - ApiProductListByApisNextOptionalParams, - ApiProductListByApisOptionalParams, - ApiProductListByApisResponse, - ApiProductListByApisNextResponse -} from "../models"; + ApiProductListByApisNextOptionalParams, + ApiProductListByApisNextResponse, + ApiProductListByApisOptionalParams, + ApiProductListByApisResponse, + ProductContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiProduct } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiProduct operations. */ export class ApiProductImpl implements ApiProduct { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiProduct class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiProduct class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApisPagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApisPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApisPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiProductListByApisResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApis( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByApisPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApisNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApisPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiProductListByApisResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApis( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApisNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApisPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApisPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApisPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApisOperationSpec - ); - } + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApisOperationSpec + ); + } - /** - * ListByApisNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByApis method. - * @param options The options parameters. - */ - private _listByApisNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiProductListByApisNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApisNextOperationSpec - ); - } + /** + * ListByApisNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByApis method. + * @param options The options parameters. + */ + private _listByApisNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiProductListByApisNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApisNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApisOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listByApisNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts index 345185b5a2d9..3a66234b3b4f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts @@ -6,496 +6,496 @@ * 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 { ApiRelease } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiReleaseContract, - ApiReleaseListByServiceNextOptionalParams, - ApiReleaseListByServiceOptionalParams, - ApiReleaseListByServiceResponse, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams, - ApiReleaseListByServiceNextResponse -} from "../models"; + ApiReleaseContract, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseCreateOrUpdateResponse, + ApiReleaseDeleteOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetEntityTagResponse, + ApiReleaseGetOptionalParams, + ApiReleaseGetResponse, + ApiReleaseListByServiceNextOptionalParams, + ApiReleaseListByServiceNextResponse, + ApiReleaseListByServiceOptionalParams, + ApiReleaseListByServiceResponse, + ApiReleaseUpdateOptionalParams, + ApiReleaseUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiRelease } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiRelease operations. */ export class ApiReleaseImpl implements ApiRelease { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiRelease class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiRelease class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiReleaseListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiReleaseListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getEntityTagOperationSpec - ); - } + /** + * Returns the etag of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, options }, + getEntityTagOperationSpec + ); + } - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getOperationSpec - ); - } + /** + * Returns the details of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, options }, + getOperationSpec + ); + } - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Release for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the release of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Release Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified release in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, releaseId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiReleaseListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiReleaseListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiReleaseGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiReleaseGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseContract, + headersMapper: Mappers.ApiReleaseUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.releaseId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.releaseId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiReleaseCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts index c76a9aa1f6bf..f7729e1ad17c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts @@ -6,217 +6,217 @@ * 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 { ApiRevision } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiRevisionContract, - ApiRevisionListByServiceNextOptionalParams, - ApiRevisionListByServiceOptionalParams, - ApiRevisionListByServiceResponse, - ApiRevisionListByServiceNextResponse -} from "../models"; + ApiRevisionContract, + ApiRevisionListByServiceNextOptionalParams, + ApiRevisionListByServiceNextResponse, + ApiRevisionListByServiceOptionalParams, + ApiRevisionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiRevision } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiRevision operations. */ export class ApiRevisionImpl implements ApiRevision { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiRevision class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiRevisionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiRevisionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiRevisionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts index 81cdbcbce722..edf227312235 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts @@ -6,532 +6,532 @@ * 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 { ApiSchema } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - SchemaContract, - ApiSchemaListByApiNextOptionalParams, - ApiSchemaListByApiOptionalParams, - ApiSchemaListByApiResponse, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams, - ApiSchemaListByApiNextResponse -} from "../models"; + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaCreateOrUpdateResponse, + ApiSchemaDeleteOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetEntityTagResponse, + ApiSchemaGetOptionalParams, + ApiSchemaGetResponse, + ApiSchemaListByApiNextOptionalParams, + ApiSchemaListByApiNextResponse, + ApiSchemaListByApiOptionalParams, + ApiSchemaListByApiResponse, + SchemaContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiSchema } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiSchema operations. */ export class ApiSchemaImpl implements ApiSchema { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiSchema class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiSchemaListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiSchemaListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getOperationSpec - ); - } + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, options }, + getOperationSpec + ); + } - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiSchemaCreateOrUpdateResponse + > + > { + 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, - serviceName, - apiId, - schemaId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - ApiSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiSchemaCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the schema configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, schemaId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiSchemaListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiSchemaListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiSchemaGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiSchemaGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.SchemaContract, + headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts index 34f2b6f132b9..4d89e121872e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts @@ -6,448 +6,448 @@ * 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 { ApiTagDescription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagDescriptionContract, - ApiTagDescriptionListByServiceNextOptionalParams, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionListByServiceResponse, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams, - ApiTagDescriptionListByServiceNextResponse -} from "../models"; + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionCreateOrUpdateResponse, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetEntityTagResponse, + ApiTagDescriptionGetOptionalParams, + ApiTagDescriptionGetResponse, + ApiTagDescriptionListByServiceNextOptionalParams, + ApiTagDescriptionListByServiceNextResponse, + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionListByServiceResponse, + TagDescriptionContract, + TagDescriptionCreateParameters +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiTagDescription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiTagDescription operations. */ export class ApiTagDescriptionImpl implements ApiTagDescription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiTagDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiTagDescription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiTagDescriptionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiTagDescriptionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getOperationSpec - ); - } + /** + * Get Tag description in scope of API + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, + getOperationSpec + ); + } - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Create/Update tag description in scope of the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Delete tag description for the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiTagDescriptionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiTagDescriptionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiTagDescriptionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiTagDescriptionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.TagDescriptionContract, + headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters15, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagDescriptionId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagDescriptionId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts index 2057a4b4532a..e42bcc3cef21 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts @@ -6,462 +6,462 @@ * 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 { ApiVersionSet } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiVersionSetContract, - ApiVersionSetListByServiceNextOptionalParams, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetListByServiceResponse, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams, - ApiVersionSetListByServiceNextResponse -} from "../models"; + ApiVersionSetContract, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetCreateOrUpdateResponse, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetEntityTagResponse, + ApiVersionSetGetOptionalParams, + ApiVersionSetGetResponse, + ApiVersionSetListByServiceNextOptionalParams, + ApiVersionSetListByServiceNextResponse, + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetListByServiceResponse, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiVersionSet } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiVersionSet operations. */ export class ApiVersionSetImpl implements ApiVersionSet { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiVersionSet class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiVersionSet class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiVersionSetListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiVersionSetListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Api VersionSet specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, versionSetId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiVersionSetListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ApiVersionSetListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiVersionSetGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiVersionSetGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetContract, + headersMapper: Mappers.ApiVersionSetUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.versionSetId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.versionSetId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiVersionSetCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts index 97883b205cfb..1251b36fb937 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts @@ -6,275 +6,275 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ApiWiki } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams -} from "../models"; + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiCreateOrUpdateResponse, + ApiWikiDeleteOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetEntityTagResponse, + ApiWikiGetOptionalParams, + ApiWikiGetResponse, + ApiWikiUpdateOptionalParams, + ApiWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiWiki } from "../operationsInterfaces/index.js"; /** Class containing ApiWiki operations. */ export class ApiWikiImpl implements ApiWiki { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiWiki class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + getOperationSpec + ); + } - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Wiki for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Wiki from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiWikiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ApiWikiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ApiWikiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts index d4aeb49360f5..3cc3924d60b7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts @@ -6,212 +6,212 @@ * 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 { ApiWikis } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - WikiContract, - ApiWikisListNextOptionalParams, - ApiWikisListOptionalParams, - ApiWikisListResponse, - ApiWikisListNextResponse -} from "../models"; + ApiWikisListNextOptionalParams, + ApiWikisListNextResponse, + ApiWikisListOptionalParams, + ApiWikisListResponse, + WikiContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ApiWikis } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ApiWikis operations. */ export class ApiWikisImpl implements ApiWikis { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ApiWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ApiWikis class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - apiId, - 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( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ApiWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, apiId, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApiWikisListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, serviceName, apiId, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listOperationSpec - ); - } + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiWikisListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: ApiWikisListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.apiId1 - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.apiId1 + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts index c347d55c595e..94c0f12d5b30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts @@ -6,459 +6,459 @@ * 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 { Authorization } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderNextOptionalParams, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationListByAuthorizationProviderResponse, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse, - AuthorizationListByAuthorizationProviderNextResponse -} from "../models"; + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationConfirmConsentCodeResponse, + AuthorizationContract, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationCreateOrUpdateResponse, + AuthorizationDeleteOptionalParams, + AuthorizationGetOptionalParams, + AuthorizationGetResponse, + AuthorizationListByAuthorizationProviderNextOptionalParams, + AuthorizationListByAuthorizationProviderNextResponse, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationListByAuthorizationProviderResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Authorization } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Authorization operations. */ export class AuthorizationImpl implements Authorization { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Authorization class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Authorization class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - public listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationProviderPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - 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.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - settings + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + public listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByAuthorizationProviderPagingAll( + resourceGroupName, + serviceName, + authorizationProviderId, + options ); - } - }; - } - - private async *listByAuthorizationProviderPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationListByAuthorizationProviderResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByAuthorizationProviderPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByAuthorizationProviderNext( - resourceGroupName, - serviceName, - authorizationProviderId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByAuthorizationProviderPagingPage( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationListByAuthorizationProviderResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAuthorizationProvider( + resourceGroupName, + serviceName, + authorizationProviderId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByAuthorizationProviderNext( + resourceGroupName, + serviceName, + authorizationProviderId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByAuthorizationProviderPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options - )) { - yield* page; + private async *listByAuthorizationProviderPagingAll( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByAuthorizationProviderPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - private _listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - listByAuthorizationProviderOperationSpec - ); - } + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + private _listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authorizationProviderId, options }, + listByAuthorizationProviderOperationSpec + ); + } - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + }, + getOperationSpec + ); + } - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific Authorization from the Authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - confirmConsentCodeOperationSpec - ); - } + /** + * Confirm valid consent code to suppress Authorizations anti-phishing page. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + confirmConsentCode( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + confirmConsentCodeOperationSpec + ); + } - /** - * ListByAuthorizationProviderNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorizationProvider - * method. - * @param options The options parameters. - */ - private _listByAuthorizationProviderNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - nextLink: string, - options?: AuthorizationListByAuthorizationProviderNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - nextLink, - options - }, - listByAuthorizationProviderNextOperationSpec - ); - } + /** + * ListByAuthorizationProviderNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param nextLink The nextLink from the previous successful call to the ListByAuthorizationProvider + * method. + * @param options The options parameters. + */ + private _listByAuthorizationProviderNext( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + nextLink: string, + options?: AuthorizationListByAuthorizationProviderNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + nextLink, + options + }, + listByAuthorizationProviderNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByAuthorizationProviderOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationContract, + headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters23, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters23, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const confirmConsentCodeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.AuthorizationConfirmConsentCodeHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.AuthorizationConfirmConsentCodeHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters24, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByAuthorizationProviderNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts index 021fe8debd36..54eb8c9b5249 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts @@ -6,434 +6,434 @@ * 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 { AuthorizationAccessPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyListByAuthorizationResponse, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams, - AuthorizationAccessPolicyListByAuthorizationNextResponse -} from "../models"; + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateResponse, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, + AuthorizationAccessPolicyGetResponse, + AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, + AuthorizationAccessPolicyListByAuthorizationNextResponse, + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyListByAuthorizationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationAccessPolicy } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationAccessPolicy operations. */ export class AuthorizationAccessPolicyImpl - implements AuthorizationAccessPolicy { - private readonly client: ApiManagementClient; + implements AuthorizationAccessPolicy { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationAccessPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationAccessPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - public listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - 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.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - settings + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + public listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByAuthorizationPagingAll( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options ); - } - }; - } - - private async *listByAuthorizationPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationAccessPolicyListByAuthorizationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByAuthorizationPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByAuthorizationNext( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByAuthorizationPagingPage( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationAccessPolicyListByAuthorizationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAuthorization( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByAuthorizationNext( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByAuthorizationPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - )) { - yield* page; + private async *listByAuthorizationPagingAll( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByAuthorizationPagingPage( + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - private _listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options - }, - listByAuthorizationOperationSpec - ); - } + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + private _listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options + }, + listByAuthorizationOperationSpec + ); + } - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - options - }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization access policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + options + }, + getOperationSpec + ); + } - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates Authorization Access Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific access policy from the Authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByAuthorizationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorization method. - * @param options The options parameters. - */ - private _listByAuthorizationNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - nextLink: string, - options?: AuthorizationAccessPolicyListByAuthorizationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - nextLink, - options - }, - listByAuthorizationNextOperationSpec - ); - } + /** + * ListByAuthorizationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param nextLink The nextLink from the previous successful call to the ListByAuthorization method. + * @param options The options parameters. + */ + private _listByAuthorizationNext( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + nextLink: string, + options?: AuthorizationAccessPolicyListByAuthorizationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + nextLink, + options + }, + listByAuthorizationNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByAuthorizationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationAccessPolicyContract, + headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters26, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters26, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId, + Parameters.authorizationAccessPolicyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByAuthorizationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationAccessPolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts index 7a86c6edba4f..437574127d9d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts @@ -6,86 +6,86 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { AuthorizationLoginLinks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse -} from "../models"; + AuthorizationLoginLinksPostOptionalParams, + AuthorizationLoginLinksPostResponse, + AuthorizationLoginRequestContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationLoginLinks } from "../operationsInterfaces/index.js"; /** Class containing AuthorizationLoginLinks operations. */ export class AuthorizationLoginLinksImpl implements AuthorizationLoginLinks { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationLoginLinks class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationLoginLinks class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options - }, - postOperationSpec - ); - } + /** + * Gets authorization login links. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + post( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options + }, + postOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const postOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationLoginResponseContract, - headersMapper: Mappers.AuthorizationLoginLinksPostHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationLoginResponseContract, + headersMapper: Mappers.AuthorizationLoginLinksPostHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters25, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId, - Parameters.authorizationId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters25, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId, + Parameters.authorizationId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts index 603eae55b5fa..567732599a30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts @@ -6,361 +6,361 @@ * 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 { AuthorizationProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceNextOptionalParams, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderListByServiceResponse, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams, - AuthorizationProviderListByServiceNextResponse -} from "../models"; + AuthorizationProviderContract, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderCreateOrUpdateResponse, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderGetOptionalParams, + AuthorizationProviderGetResponse, + AuthorizationProviderListByServiceNextOptionalParams, + AuthorizationProviderListByServiceNextResponse, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationProvider operations. */ export class AuthorizationProviderImpl implements AuthorizationProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization provider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authorizationProviderId, options }, + getOperationSpec + ); + } - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes specific authorization provider from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + authorizationProviderId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: AuthorizationProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationProviderContract, + headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters22, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authorizationProviderId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authorizationProviderId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts index 99abc294e940..bcecf727ca8a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts @@ -6,495 +6,495 @@ * 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 { AuthorizationServer } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AuthorizationServerContract, - AuthorizationServerListByServiceNextOptionalParams, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerListByServiceResponse, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse, - AuthorizationServerListByServiceNextResponse -} from "../models"; + AuthorizationServerContract, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerCreateOrUpdateResponse, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetEntityTagResponse, + AuthorizationServerGetOptionalParams, + AuthorizationServerGetResponse, + AuthorizationServerListByServiceNextOptionalParams, + AuthorizationServerListByServiceNextResponse, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerListByServiceResponse, + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListSecretsResponse, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { AuthorizationServer } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing AuthorizationServer operations. */ export class AuthorizationServerImpl implements AuthorizationServer { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class AuthorizationServer class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class AuthorizationServer class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AuthorizationServerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AuthorizationServerListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getOperationSpec - ); - } + /** + * Gets the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + getOperationSpec + ); + } - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates new authorization server or updates an existing authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters OAuth2 Server settings Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific authorization server instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, authsid, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationServerListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: AuthorizationServerListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.AuthorizationServerGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.AuthorizationServerGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters20, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerContract, + headersMapper: Mappers.AuthorizationServerUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters21, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerSecretsContract, - headersMapper: Mappers.AuthorizationServerListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerSecretsContract, + headersMapper: Mappers.AuthorizationServerListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.authsid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.authsid + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorizationServerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts index c445f24cedbc..63ab30634221 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts @@ -6,507 +6,507 @@ * 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 { Backend } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - BackendContract, - BackendListByServiceNextOptionalParams, - BackendListByServiceOptionalParams, - BackendListByServiceResponse, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams, - BackendListByServiceNextResponse -} from "../models"; + BackendContract, + BackendCreateOrUpdateOptionalParams, + BackendCreateOrUpdateResponse, + BackendDeleteOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetEntityTagResponse, + BackendGetOptionalParams, + BackendGetResponse, + BackendListByServiceNextOptionalParams, + BackendListByServiceNextResponse, + BackendListByServiceOptionalParams, + BackendListByServiceResponse, + BackendReconnectOptionalParams, + BackendUpdateOptionalParams, + BackendUpdateParameters, + BackendUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Backend } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Backend operations. */ export class BackendImpl implements Backend { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Backend class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Backend class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: BackendListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BackendListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + backendId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - reconnectOperationSpec - ); - } + /** + * Notifies the API Management gateway to create a new connection to the backend after the specified + * timeout. If no timeout was specified, timeout of 2 minutes is used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + reconnect( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, backendId, options }, + reconnectOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: BackendListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: BackendListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.BackendGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.BackendGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters27, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters27, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.BackendContract, + headersMapper: Mappers.BackendUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters28, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters28, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const reconnectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", - httpMethod: "POST", - responses: { - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.backendId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", + httpMethod: "POST", + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.backendId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackendCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts index 4c8a2d9f2f7c..123bf1c28fde 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts @@ -6,450 +6,450 @@ * 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 { Cache } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - CacheContract, - CacheListByServiceNextOptionalParams, - CacheListByServiceOptionalParams, - CacheListByServiceResponse, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams, - CacheListByServiceNextResponse -} from "../models"; + CacheContract, + CacheCreateOrUpdateOptionalParams, + CacheCreateOrUpdateResponse, + CacheDeleteOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetEntityTagResponse, + CacheGetOptionalParams, + CacheGetResponse, + CacheListByServiceNextOptionalParams, + CacheListByServiceNextResponse, + CacheListByServiceOptionalParams, + CacheListByServiceResponse, + CacheUpdateOptionalParams, + CacheUpdateParameters, + CacheUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Cache } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Cache operations. */ export class CacheImpl implements Cache { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Cache class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Cache class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: CacheListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CacheListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, options }, + getOperationSpec + ); + } - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates an External Cache to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Cache. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, cacheId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CacheListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: CacheListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CacheGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.CacheGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters30, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CacheContract, + headersMapper: Mappers.CacheUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters31, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters31, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.cacheId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.cacheId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts index e4768349aeb3..f50562b58c12 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts @@ -6,445 +6,445 @@ * 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 { Certificate } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - CertificateContract, - CertificateListByServiceNextOptionalParams, - CertificateListByServiceOptionalParams, - CertificateListByServiceResponse, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse, - CertificateListByServiceNextResponse -} from "../models"; + CertificateContract, + CertificateCreateOrUpdateOptionalParams, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateResponse, + CertificateDeleteOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetEntityTagResponse, + CertificateGetOptionalParams, + CertificateGetResponse, + CertificateListByServiceNextOptionalParams, + CertificateListByServiceNextResponse, + CertificateListByServiceOptionalParams, + CertificateListByServiceResponse, + CertificateRefreshSecretOptionalParams, + CertificateRefreshSecretResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Certificate } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Certificate operations. */ export class CertificateImpl implements Certificate { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Certificate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Certificate class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: CertificateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CertificateListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - refreshSecretOperationSpec - ); - } + /** + * From KeyVault, Refresh the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + refreshSecret( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, certificateId, options }, + refreshSecretOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CertificateListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: CertificateListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.isKeyVaultRefreshFailed - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.isKeyVaultRefreshFailed + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CertificateGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.CertificateGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters32, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters32, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateRefreshSecretHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CertificateContract, + headersMapper: Mappers.CertificateRefreshSecretHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts index 3f3cc3eac3b8..f67986090b58 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts @@ -6,430 +6,430 @@ * 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 { ContentItem } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ContentItemContract, - ContentItemListByServiceNextOptionalParams, - ContentItemListByServiceOptionalParams, - ContentItemListByServiceResponse, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams, - ContentItemListByServiceNextResponse -} from "../models"; + ContentItemContract, + ContentItemCreateOrUpdateOptionalParams, + ContentItemCreateOrUpdateResponse, + ContentItemDeleteOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetEntityTagResponse, + ContentItemGetOptionalParams, + ContentItemGetResponse, + ContentItemListByServiceNextOptionalParams, + ContentItemListByServiceNextResponse, + ContentItemListByServiceOptionalParams, + ContentItemListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ContentItem } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ContentItem operations. */ export class ContentItemImpl implements ContentItem { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ContentItem class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ContentItem class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - contentTypeId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options, - settings + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + contentTypeId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ContentItemListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - contentTypeId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + contentTypeId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - contentTypeId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ContentItemListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + contentTypeId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + contentTypeId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + contentTypeId, + options + )) { + yield* page; + } } - } - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, options }, + listByServiceOperationSpec + ); + } - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getEntityTagOperationSpec - ); - } + /** + * Returns the entity state (ETag) version of the developer portal's content item specified by its + * identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, + getEntityTagOperationSpec + ); + } - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getOperationSpec - ); - } + /** + * Returns the developer portal's content item specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, + getOperationSpec + ); + } - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new developer portal's content item specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Removes the specified developer portal's content item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - nextLink: string, - options?: ContentItemListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + nextLink: string, + options?: ContentItemListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ContentItemGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ContentItemGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ContentItemContract, + headersMapper: Mappers.ContentItemCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters34, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId, - Parameters.contentItemId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId, + Parameters.contentItemId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentItemCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts index e9208395eed7..bffde11c2e12 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts @@ -6,351 +6,351 @@ * 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 { ContentType } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ContentTypeContract, - ContentTypeListByServiceNextOptionalParams, - ContentTypeListByServiceOptionalParams, - ContentTypeListByServiceResponse, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams, - ContentTypeListByServiceNextResponse -} from "../models"; + ContentTypeContract, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeCreateOrUpdateResponse, + ContentTypeDeleteOptionalParams, + ContentTypeGetOptionalParams, + ContentTypeGetResponse, + ContentTypeListByServiceNextOptionalParams, + ContentTypeListByServiceNextResponse, + ContentTypeListByServiceOptionalParams, + ContentTypeListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ContentType } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ContentType operations. */ export class ContentTypeImpl implements ContentType { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ContentType class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ContentType class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ContentTypeListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ContentTypeListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Custom content types' identifiers need to start with + * the `c-` prefix. Built-in content types can't be modified. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Removes the specified developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Built-in content types (with identifiers starting + * with the `c-` prefix) can't be removed. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, contentTypeId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ContentTypeListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ContentTypeListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ContentTypeContract, + headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters33, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters33, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.contentTypeId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.contentTypeId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContentTypeCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts index d4a14c240964..6deff74564bc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts @@ -6,249 +6,249 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { DelegationSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse -} from "../models"; + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsCreateOrUpdateResponse, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetEntityTagResponse, + DelegationSettingsGetOptionalParams, + DelegationSettingsGetResponse, + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsListSecretsResponse, + DelegationSettingsUpdateOptionalParams, + PortalDelegationSettings +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DelegationSettings } from "../operationsInterfaces/index.js"; /** Class containing DelegationSettings operations. */ export class DelegationSettingsImpl implements DelegationSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class DelegationSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class DelegationSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Delegation Settings for the Portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Delegation settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the secret validation key of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listSecretsOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DelegationSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DelegationSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings, - headersMapper: Mappers.DelegationSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalDelegationSettings, + headersMapper: Mappers.DelegationSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters62, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalDelegationSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters62, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingValidationKeyContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PortalSettingValidationKeyContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts index 8dd8dab2cfc4..e37b328df9e6 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts @@ -6,302 +6,302 @@ * 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 { DeletedServices } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - DeletedServiceContract, - DeletedServicesListBySubscriptionNextOptionalParams, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesListBySubscriptionResponse, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams, - DeletedServicesListBySubscriptionNextResponse -} from "../models"; + DeletedServiceContract, + DeletedServicesGetByNameOptionalParams, + DeletedServicesGetByNameResponse, + DeletedServicesListBySubscriptionNextOptionalParams, + DeletedServicesListBySubscriptionNextResponse, + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesListBySubscriptionResponse, + DeletedServicesPurgeOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DeletedServices } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing DeletedServices operations. */ export class DeletedServicesImpl implements DeletedServices { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class DeletedServices class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): 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); - } - }; - } + /** + * Initialize a new instance of the class DeletedServices class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listBySubscriptionPagingPage( - options?: DeletedServicesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DeletedServicesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): 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); + } + }; } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listBySubscriptionPagingPage( + options?: DeletedServicesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DeletedServicesListBySubscriptionResponse; + 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?: DeletedServicesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; + private async *listBySubscriptionPagingAll( + options?: DeletedServicesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } } - } - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { serviceName, location, options }, - getByNameOperationSpec - ); - } + /** + * Get soft-deleted Api Management Service by name. + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + getByName( + serviceName: string, + location: string, + options?: DeletedServicesGetByNameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { serviceName, location, options }, + getByNameOperationSpec + ); + } - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): 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() - } - }; - }; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + async beginPurge( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): 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: { serviceName, location, options }, - spec: purgeOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { serviceName, location, options }, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise { - const poller = await this.beginPurge(serviceName, location, options); - return poller.pollUntilDone(); - } + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + async beginPurgeAndWait( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise { + const poller = await this.beginPurge(serviceName, location, options); + return poller.pollUntilDone(); + } - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: DeletedServicesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: DeletedServicesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServicesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer }; const getByNameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServiceContract + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServiceContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer }; const purgeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeletedServicesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts index d27a987dc82b..51309967ee74 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts @@ -6,461 +6,461 @@ * 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 { Diagnostic } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DiagnosticContract, - DiagnosticListByServiceNextOptionalParams, - DiagnosticListByServiceOptionalParams, - DiagnosticListByServiceResponse, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams, - DiagnosticListByServiceNextResponse -} from "../models"; + DiagnosticContract, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticCreateOrUpdateResponse, + DiagnosticDeleteOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetEntityTagResponse, + DiagnosticGetOptionalParams, + DiagnosticGetResponse, + DiagnosticListByServiceNextOptionalParams, + DiagnosticListByServiceNextResponse, + DiagnosticListByServiceOptionalParams, + DiagnosticListByServiceResponse, + DiagnosticUpdateOptionalParams, + DiagnosticUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Diagnostic } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Diagnostic operations. */ export class DiagnosticImpl implements Diagnostic { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Diagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Diagnostic class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DiagnosticListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, options }, + getOperationSpec + ); + } - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Diagnostic or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Diagnostic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, diagnosticId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DiagnosticListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: DiagnosticListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DiagnosticGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DiagnosticGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticContract, + headersMapper: Mappers.DiagnosticUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.diagnosticId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.diagnosticId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts index 7550ac83335b..2fffc59b0677 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts @@ -6,462 +6,462 @@ * 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 { Documentation } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - DocumentationContract, - DocumentationListByServiceNextOptionalParams, - DocumentationListByServiceOptionalParams, - DocumentationListByServiceResponse, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams, - DocumentationListByServiceNextResponse -} from "../models"; + DocumentationContract, + DocumentationCreateOrUpdateOptionalParams, + DocumentationCreateOrUpdateResponse, + DocumentationDeleteOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetEntityTagResponse, + DocumentationGetOptionalParams, + DocumentationGetResponse, + DocumentationListByServiceNextOptionalParams, + DocumentationListByServiceNextResponse, + DocumentationListByServiceOptionalParams, + DocumentationListByServiceResponse, + DocumentationUpdateContract, + DocumentationUpdateOptionalParams, + DocumentationUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Documentation } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Documentation operations. */ export class DocumentationImpl implements Documentation { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Documentation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Documentation class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DocumentationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DocumentationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Documentation by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Documentation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, options }, + getOperationSpec + ); + } - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Documentation or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - documentationId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Documentation for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Documentation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Documentation from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, documentationId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DocumentationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: DocumentationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DocumentationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.DocumentationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters76, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DocumentationContract, + headersMapper: Mappers.DocumentationUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters77, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.documentationId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.documentationId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DocumentationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts index f718843e6496..cc3814169ca2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts @@ -6,456 +6,456 @@ * 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 { EmailTemplate } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - EmailTemplateContract, - EmailTemplateListByServiceNextOptionalParams, - EmailTemplateListByServiceOptionalParams, - EmailTemplateListByServiceResponse, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams, - EmailTemplateListByServiceNextResponse -} from "../models"; + EmailTemplateContract, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateCreateOrUpdateResponse, + EmailTemplateDeleteOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetEntityTagResponse, + EmailTemplateGetOptionalParams, + EmailTemplateGetResponse, + EmailTemplateListByServiceNextOptionalParams, + EmailTemplateListByServiceNextResponse, + EmailTemplateListByServiceOptionalParams, + EmailTemplateListByServiceResponse, + EmailTemplateUpdateOptionalParams, + EmailTemplateUpdateParameters, + EmailTemplateUpdateResponse, + TemplateName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EmailTemplate } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing EmailTemplate operations. */ export class EmailTemplateImpl implements EmailTemplate { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class EmailTemplate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class EmailTemplate class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: EmailTemplateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EmailTemplateListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getOperationSpec - ); - } + /** + * Gets the details of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, options }, + getOperationSpec + ); + } - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Updates an Email Template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param parameters Email Template update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates API Management email template + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + templateName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Reset the Email Template to default template provided by the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, templateName, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: EmailTemplateListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: EmailTemplateListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.EmailTemplateGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.EmailTemplateGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract, + headersMapper: Mappers.EmailTemplateGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract - }, - 201: { - bodyMapper: Mappers.EmailTemplateContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract + }, + 201: { + bodyMapper: Mappers.EmailTemplateContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters40, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateContract, + headersMapper: Mappers.EmailTemplateUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters40, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.templateName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.templateName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailTemplateCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts index 490287bf253f..e87908fa3bf2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts @@ -6,604 +6,604 @@ * 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 { Gateway } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayContract, - GatewayListByServiceNextOptionalParams, - GatewayListByServiceOptionalParams, - GatewayListByServiceResponse, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse, - GatewayListByServiceNextResponse -} from "../models"; + GatewayContract, + GatewayCreateOrUpdateOptionalParams, + GatewayCreateOrUpdateResponse, + GatewayDeleteOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayGenerateTokenResponse, + GatewayGetEntityTagOptionalParams, + GatewayGetEntityTagResponse, + GatewayGetOptionalParams, + GatewayGetResponse, + GatewayKeyRegenerationRequestContract, + GatewayListByServiceNextOptionalParams, + GatewayListByServiceNextResponse, + GatewayListByServiceOptionalParams, + GatewayListByServiceResponse, + GatewayListKeysOptionalParams, + GatewayListKeysResponse, + GatewayRegenerateKeyOptionalParams, + GatewayTokenRequestContract, + GatewayUpdateOptionalParams, + GatewayUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Gateway } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Gateway operations. */ export class GatewayImpl implements Gateway { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Gateway class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Gateway class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + getOperationSpec + ); + } - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates a Gateway to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Gateway details. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listKeysOperationSpec - ); - } + /** + * Retrieves gateway keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listKeysOperationSpec + ); + } - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - regenerateKeyOperationSpec - ); - } + /** + * Regenerates specified gateway key invalidating any tokens created with it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway key regeneration request contract properties. + * @param options The options parameters. + */ + regenerateKey( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + regenerateKeyOperationSpec + ); + } - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - generateTokenOperationSpec - ); - } + /** + * Gets the Shared Access Authorization Token for the gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway token request contract properties. + * @param options The options parameters. + */ + generateToken( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, parameters, options }, + generateTokenOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GatewayListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GatewayListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters41, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GatewayContract, + headersMapper: Mappers.GatewayUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters41, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayKeysContract, - headersMapper: Mappers.GatewayListKeysHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GatewayKeysContract, + headersMapper: Mappers.GatewayListKeysHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters42, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters42, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const generateTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayTokenContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GatewayTokenContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters43, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts index b355825a6bfe..add21a6cb2b3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts @@ -6,367 +6,367 @@ * 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 { GatewayApi } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiContract, - GatewayApiListByServiceNextOptionalParams, - GatewayApiListByServiceOptionalParams, - GatewayApiListByServiceResponse, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams, - GatewayApiListByServiceNextResponse -} from "../models"; + ApiContract, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiCreateOrUpdateResponse, + GatewayApiDeleteOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiGetEntityTagResponse, + GatewayApiListByServiceNextOptionalParams, + GatewayApiListByServiceNextResponse, + GatewayApiListByServiceOptionalParams, + GatewayApiListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayApi } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayApi operations. */ export class GatewayApiImpl implements GatewayApi { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayApi class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayApiListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks that API entity specified by identifier is associated with the Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + getEntityTagOperationSpec + ); + } - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds an API to the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, apiId, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayApiListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayApiListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayApiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayApiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract - }, - 201: { - bodyMapper: Mappers.ApiContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract + }, + 201: { + bodyMapper: Mappers.ApiContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters45, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId1, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId1, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts index bac861289331..eb64476cbd56 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts @@ -6,446 +6,446 @@ * 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 { GatewayCertificateAuthority } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceNextOptionalParams, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityListByServiceResponse, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams, - GatewayCertificateAuthorityListByServiceNextResponse -} from "../models"; + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateResponse, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetEntityTagResponse, + GatewayCertificateAuthorityGetOptionalParams, + GatewayCertificateAuthorityGetResponse, + GatewayCertificateAuthorityListByServiceNextOptionalParams, + GatewayCertificateAuthorityListByServiceNextResponse, + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayCertificateAuthority } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayCertificateAuthority operations. */ export class GatewayCertificateAuthorityImpl - implements GatewayCertificateAuthority { - private readonly client: ApiManagementClient; + implements GatewayCertificateAuthority { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayCertificateAuthority class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayCertificateAuthority class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayCertificateAuthorityListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayCertificateAuthorityListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, certificateId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getOperationSpec - ); - } + /** + * Get assigned Gateway Certificate Authority details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, certificateId, options }, + getOperationSpec + ); + } - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Assign Certificate entity to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Gateway certificate authority details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Remove relationship between Certificate Authority and Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + gatewayId, + certificateId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayCertificateAuthorityListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayCertificateAuthorityListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayCertificateAuthorityGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayCertificateAuthorityGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayCertificateAuthorityContract, + headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters46, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters46, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.certificateId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.certificateId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayCertificateAuthorityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts index c65ce1a26b6b..8fde59764dc9 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts @@ -6,433 +6,433 @@ * 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 { GatewayHostnameConfiguration } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceNextOptionalParams, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationListByServiceResponse, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams, - GatewayHostnameConfigurationListByServiceNextResponse -} from "../models"; + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateResponse, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetEntityTagResponse, + GatewayHostnameConfigurationGetOptionalParams, + GatewayHostnameConfigurationGetResponse, + GatewayHostnameConfigurationListByServiceNextOptionalParams, + GatewayHostnameConfigurationListByServiceNextResponse, + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GatewayHostnameConfiguration } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GatewayHostnameConfiguration operations. */ export class GatewayHostnameConfigurationImpl - implements GatewayHostnameConfiguration { - private readonly client: ApiManagementClient; + implements GatewayHostnameConfiguration { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GatewayHostnameConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GatewayHostnameConfiguration class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + gatewayId, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GatewayHostnameConfigurationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GatewayHostnameConfigurationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + gatewayId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + gatewayId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + gatewayId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, options }, + listByServiceOperationSpec + ); + } - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getEntityTagOperationSpec - ); - } + /** + * Checks that hostname configuration entity specified by identifier exists for specified Gateway + * entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getOperationSpec - ); - } + /** + * Get details of a hostname configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, options }, + getOperationSpec + ); + } - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates of updates hostname configuration for a Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param parameters Gateway hostname configuration details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified hostname configuration from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayHostnameConfigurationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + nextLink: string, + options?: GatewayHostnameConfigurationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, gatewayId, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayHostnameConfigurationGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GatewayHostnameConfigurationGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GatewayHostnameConfigurationContract, + headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters44, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.gatewayId, - Parameters.hcId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.gatewayId, + Parameters.hcId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewayHostnameConfigurationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.gatewayId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.gatewayId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts index 9081ec027225..ff9d7b6ecf36 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts @@ -6,487 +6,487 @@ * 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 { GlobalSchema } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - GlobalSchemaContract, - GlobalSchemaListByServiceNextOptionalParams, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaListByServiceResponse, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams, - GlobalSchemaListByServiceNextResponse -} from "../models"; + GlobalSchemaContract, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaListByServiceNextOptionalParams, + GlobalSchemaListByServiceNextResponse, + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GlobalSchema } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GlobalSchema operations. */ export class GlobalSchemaImpl implements GlobalSchema { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GlobalSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GlobalSchema class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GlobalSchemaListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GlobalSchemaListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, options }, + getOperationSpec + ); + } - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalSchemaCreateOrUpdateResponse + > + > { + 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, serviceName, schemaId, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - GlobalSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, schemaId, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GlobalSchemaCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - schemaId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + schemaId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, schemaId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GlobalSchemaListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GlobalSchemaListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.GlobalSchemaContract, + headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters66, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters66, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.schemaId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.schemaId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GlobalSchemaCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts index 1d2fa2cedd2a..f6d5f9713d5e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts @@ -6,508 +6,508 @@ * 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 { GraphQLApiResolver } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ResolverContract, - GraphQLApiResolverListByApiNextOptionalParams, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverListByApiResponse, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams, - GraphQLApiResolverListByApiNextResponse -} from "../models"; + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateResponse, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetEntityTagResponse, + GraphQLApiResolverGetOptionalParams, + GraphQLApiResolverGetResponse, + GraphQLApiResolverListByApiNextOptionalParams, + GraphQLApiResolverListByApiNextResponse, + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverListByApiResponse, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverUpdateResponse, + ResolverContract, + ResolverUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GraphQLApiResolver } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GraphQLApiResolver operations. */ export class GraphQLApiResolverImpl implements GraphQLApiResolver { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GraphQLApiResolver class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GraphQLApiResolver class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GraphQLApiResolverListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GraphQLApiResolverListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the GraphQL API Resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + getOperationSpec + ); + } - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new resolver in the GraphQL API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the resolver in the GraphQL API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters GraphQL API Resolver Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified resolver in the GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: GraphQLApiResolverListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: GraphQLApiResolverListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GraphQLApiResolverGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ResolverContract, + headersMapper: Mappers.GraphQLApiResolverUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ResolverCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts index 884fac6979f9..727eeb10bc43 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts @@ -6,473 +6,473 @@ * 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 { GraphQLApiResolverPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverNextOptionalParams, - GraphQLApiResolverPolicyListByResolverOptionalParams, - GraphQLApiResolverPolicyListByResolverResponse, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams, - GraphQLApiResolverPolicyListByResolverNextResponse -} from "../models"; + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateResponse, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetEntityTagResponse, + GraphQLApiResolverPolicyGetOptionalParams, + GraphQLApiResolverPolicyGetResponse, + GraphQLApiResolverPolicyListByResolverNextOptionalParams, + GraphQLApiResolverPolicyListByResolverNextResponse, + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyListByResolverResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GraphQLApiResolverPolicy } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GraphQLApiResolverPolicy operations. */ export class GraphQLApiResolverPolicyImpl implements GraphQLApiResolverPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GraphQLApiResolverPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GraphQLApiResolverPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - public listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResolverPagingAll( - resourceGroupName, - serviceName, - apiId, - resolverId, - 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.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - settings + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + public listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResolverPagingAll( + resourceGroupName, + serviceName, + apiId, + resolverId, + options ); - } - }; - } - - private async *listByResolverPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GraphQLApiResolverPolicyListByResolverResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByResolverPagingPage( + resourceGroupName, + serviceName, + apiId, + resolverId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByResolverNext( - resourceGroupName, - serviceName, - apiId, - resolverId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByResolverPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GraphQLApiResolverPolicyListByResolverResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResolver( + resourceGroupName, + serviceName, + apiId, + resolverId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResolverNext( + resourceGroupName, + serviceName, + apiId, + resolverId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByResolverPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options - )) { - yield* page; + private async *listByResolverPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResolverPagingPage( + resourceGroupName, + serviceName, + apiId, + resolverId, + options + )) { + yield* page; + } } - } - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - private _listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - listByResolverOperationSpec - ); - } + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + private _listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, options }, + listByResolverOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the GraphQL Api Resolver. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * ListByResolverNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByResolver method. - * @param options The options parameters. - */ - private _listByResolverNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - nextLink: string, - options?: GraphQLApiResolverPolicyListByResolverNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, nextLink, options }, - listByResolverNextOperationSpec - ); - } + /** + * ListByResolverNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByResolver method. + * @param options The options parameters. + */ + private _listByResolverNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + nextLink: string, + options?: GraphQLApiResolverPolicyListByResolverNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, resolverId, nextLink, options }, + listByResolverNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByResolverOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GraphQLApiResolverPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.policyId, + Parameters.resolverId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByResolverNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink, - Parameters.resolverId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink, + Parameters.resolverId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts b/sdk/apimanagement/arm-apimanagement/src/operations/group.ts index d2e53a84fd5e..453d9a8f08e2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/group.ts @@ -6,451 +6,451 @@ * 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 { Group } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - GroupListByServiceNextOptionalParams, - GroupListByServiceOptionalParams, - GroupListByServiceResponse, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams, - GroupListByServiceNextResponse -} from "../models"; + GroupContract, + GroupCreateOrUpdateOptionalParams, + GroupCreateOrUpdateResponse, + GroupCreateParameters, + GroupDeleteOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetEntityTagResponse, + GroupGetOptionalParams, + GroupGetResponse, + GroupListByServiceNextOptionalParams, + GroupListByServiceNextResponse, + GroupListByServiceOptionalParams, + GroupListByServiceResponse, + GroupUpdateOptionalParams, + GroupUpdateParameters, + GroupUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Group } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Group operations. */ export class GroupImpl implements Group { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Group class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Group class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GroupListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GroupListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific group of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GroupListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: GroupListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GroupGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.GroupGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GroupContract, + headersMapper: Mappers.GroupUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters48, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters48, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts index d0e13397ab74..ade4be6fc3f3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts @@ -6,358 +6,358 @@ * 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 { GroupUser } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserContract, - GroupUserListNextOptionalParams, - GroupUserListOptionalParams, - GroupUserListResponse, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams, - GroupUserListNextResponse -} from "../models"; + GroupUserCheckEntityExistsOptionalParams, + GroupUserCheckEntityExistsResponse, + GroupUserCreateOptionalParams, + GroupUserCreateResponse, + GroupUserDeleteOptionalParams, + GroupUserListNextOptionalParams, + GroupUserListNextResponse, + GroupUserListOptionalParams, + GroupUserListResponse, + UserContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { GroupUser } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing GroupUser operations. */ export class GroupUserImpl implements GroupUser { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class GroupUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class GroupUser class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - groupId, - 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( - resourceGroupName, - serviceName, - groupId, - options, - settings + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + groupId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GroupUserListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - groupId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + groupId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - groupId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GroupUserListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + groupId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + groupId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - groupId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + groupId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - listOperationSpec - ); - } + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, options }, + listOperationSpec + ); + } - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that user entity specified by identifier is associated with the group entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - createOperationSpec - ); - } + /** + * Add existing user to existing group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + createOperationSpec + ); + } - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - deleteOperationSpec - ); - } + /** + * Remove existing user from existing group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, userId, options }, + deleteOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - groupId: string, - nextLink: string, - options?: GroupUserListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + groupId: string, + nextLink: string, + options?: GroupUserListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, groupId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract - }, - 201: { - bodyMapper: Mappers.UserContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UserContract + }, + 201: { + bodyMapper: Mappers.UserContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.groupId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.groupId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts index 7718b64cc6b3..0b3cff6cddc2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts @@ -6,511 +6,511 @@ * 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 { IdentityProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IdentityProviderContract, - IdentityProviderListByServiceNextOptionalParams, - IdentityProviderListByServiceOptionalParams, - IdentityProviderListByServiceResponse, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse, - IdentityProviderListByServiceNextResponse -} from "../models"; + IdentityProviderContract, + IdentityProviderCreateContract, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderCreateOrUpdateResponse, + IdentityProviderDeleteOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetEntityTagResponse, + IdentityProviderGetOptionalParams, + IdentityProviderGetResponse, + IdentityProviderListByServiceNextOptionalParams, + IdentityProviderListByServiceNextResponse, + IdentityProviderListByServiceOptionalParams, + IdentityProviderListByServiceResponse, + IdentityProviderListSecretsOptionalParams, + IdentityProviderListSecretsResponse, + IdentityProviderType, + IdentityProviderUpdateOptionalParams, + IdentityProviderUpdateParameters, + IdentityProviderUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { IdentityProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing IdentityProvider operations. */ export class IdentityProviderImpl implements IdentityProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class IdentityProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class IdentityProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: IdentityProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IdentityProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the identityProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getOperationSpec - ); - } + /** + * Gets the configuration details of the identity Provider configured in specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + getOperationSpec + ); + } - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates the IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - options - }, - deleteOperationSpec - ); - } + /** + * Deletes the specified identity provider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + options + }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the Identity Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, identityProviderName, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IdentityProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: IdentityProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.IdentityProviderGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.IdentityProviderGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters49, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters49, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderContract, + headersMapper: Mappers.IdentityProviderUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters50, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.IdentityProviderListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ClientSecretContract, + headersMapper: Mappers.IdentityProviderListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.identityProviderName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.identityProviderName + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IdentityProviderList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts index 83434e88bcd2..c6971639d6be 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts @@ -6,91 +6,91 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./api"; -export * from "./apiRevision"; -export * from "./apiRelease"; -export * from "./apiOperation"; -export * from "./apiOperationPolicy"; -export * from "./tag"; -export * from "./graphQLApiResolver"; -export * from "./graphQLApiResolverPolicy"; -export * from "./apiProduct"; -export * from "./apiPolicy"; -export * from "./apiSchema"; -export * from "./apiDiagnostic"; -export * from "./apiIssue"; -export * from "./apiIssueComment"; -export * from "./apiIssueAttachment"; -export * from "./apiTagDescription"; -export * from "./operationOperations"; -export * from "./apiWiki"; -export * from "./apiWikis"; -export * from "./apiExport"; -export * from "./apiVersionSet"; -export * from "./authorizationServer"; -export * from "./authorizationProvider"; -export * from "./authorization"; -export * from "./authorizationLoginLinks"; -export * from "./authorizationAccessPolicy"; -export * from "./backend"; -export * from "./cache"; -export * from "./certificate"; -export * from "./contentType"; -export * from "./contentItem"; -export * from "./deletedServices"; -export * from "./apiManagementOperations"; -export * from "./apiManagementServiceSkus"; -export * from "./apiManagementService"; -export * from "./diagnostic"; -export * from "./emailTemplate"; -export * from "./gateway"; -export * from "./gatewayHostnameConfiguration"; -export * from "./gatewayApi"; -export * from "./gatewayCertificateAuthority"; -export * from "./group"; -export * from "./groupUser"; -export * from "./identityProvider"; -export * from "./issue"; -export * from "./logger"; -export * from "./namedValue"; -export * from "./networkStatus"; -export * from "./notification"; -export * from "./notificationRecipientUser"; -export * from "./notificationRecipientEmail"; -export * from "./openIdConnectProvider"; -export * from "./outboundNetworkDependenciesEndpoints"; -export * from "./policy"; -export * from "./policyDescription"; -export * from "./policyFragment"; -export * from "./portalConfig"; -export * from "./portalRevision"; -export * from "./portalSettings"; -export * from "./signInSettings"; -export * from "./signUpSettings"; -export * from "./delegationSettings"; -export * from "./privateEndpointConnectionOperations"; -export * from "./product"; -export * from "./productApi"; -export * from "./productGroup"; -export * from "./productSubscriptions"; -export * from "./productPolicy"; -export * from "./productWiki"; -export * from "./productWikis"; -export * from "./quotaByCounterKeys"; -export * from "./quotaByPeriodKeys"; -export * from "./region"; -export * from "./reports"; -export * from "./globalSchema"; -export * from "./tenantSettings"; -export * from "./apiManagementSkus"; -export * from "./subscription"; -export * from "./tagResource"; -export * from "./tenantAccess"; -export * from "./tenantAccessGit"; -export * from "./tenantConfiguration"; -export * from "./user"; -export * from "./userGroup"; -export * from "./userSubscription"; -export * from "./userIdentities"; -export * from "./userConfirmationPassword"; -export * from "./documentation"; +export * from "./api.js"; +export * from "./apiDiagnostic.js"; +export * from "./apiExport.js"; +export * from "./apiIssue.js"; +export * from "./apiIssueAttachment.js"; +export * from "./apiIssueComment.js"; +export * from "./apiManagementOperations.js"; +export * from "./apiManagementService.js"; +export * from "./apiManagementServiceSkus.js"; +export * from "./apiManagementSkus.js"; +export * from "./apiOperation.js"; +export * from "./apiOperationPolicy.js"; +export * from "./apiPolicy.js"; +export * from "./apiProduct.js"; +export * from "./apiRelease.js"; +export * from "./apiRevision.js"; +export * from "./apiSchema.js"; +export * from "./apiTagDescription.js"; +export * from "./apiVersionSet.js"; +export * from "./apiWiki.js"; +export * from "./apiWikis.js"; +export * from "./authorization.js"; +export * from "./authorizationAccessPolicy.js"; +export * from "./authorizationLoginLinks.js"; +export * from "./authorizationProvider.js"; +export * from "./authorizationServer.js"; +export * from "./backend.js"; +export * from "./cache.js"; +export * from "./certificate.js"; +export * from "./contentItem.js"; +export * from "./contentType.js"; +export * from "./delegationSettings.js"; +export * from "./deletedServices.js"; +export * from "./diagnostic.js"; +export * from "./documentation.js"; +export * from "./emailTemplate.js"; +export * from "./gateway.js"; +export * from "./gatewayApi.js"; +export * from "./gatewayCertificateAuthority.js"; +export * from "./gatewayHostnameConfiguration.js"; +export * from "./globalSchema.js"; +export * from "./graphQLApiResolver.js"; +export * from "./graphQLApiResolverPolicy.js"; +export * from "./group.js"; +export * from "./groupUser.js"; +export * from "./identityProvider.js"; +export * from "./issue.js"; +export * from "./logger.js"; +export * from "./namedValue.js"; +export * from "./networkStatus.js"; +export * from "./notification.js"; +export * from "./notificationRecipientEmail.js"; +export * from "./notificationRecipientUser.js"; +export * from "./openIdConnectProvider.js"; +export * from "./operationOperations.js"; +export * from "./outboundNetworkDependenciesEndpoints.js"; +export * from "./policy.js"; +export * from "./policyDescription.js"; +export * from "./policyFragment.js"; +export * from "./portalConfig.js"; +export * from "./portalRevision.js"; +export * from "./portalSettings.js"; +export * from "./privateEndpointConnectionOperations.js"; +export * from "./product.js"; +export * from "./productApi.js"; +export * from "./productGroup.js"; +export * from "./productPolicy.js"; +export * from "./productSubscriptions.js"; +export * from "./productWiki.js"; +export * from "./productWikis.js"; +export * from "./quotaByCounterKeys.js"; +export * from "./quotaByPeriodKeys.js"; +export * from "./region.js"; +export * from "./reports.js"; +export * from "./signInSettings.js"; +export * from "./signUpSettings.js"; +export * from "./subscription.js"; +export * from "./tag.js"; +export * from "./tagResource.js"; +export * from "./tenantAccess.js"; +export * from "./tenantAccessGit.js"; +export * from "./tenantConfiguration.js"; +export * from "./tenantSettings.js"; +export * from "./user.js"; +export * from "./userConfirmationPassword.js"; +export * from "./userGroup.js"; +export * from "./userIdentities.js"; +export * from "./userSubscription.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts index 55bf4c71ee76..1373d7d3fe97 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts @@ -6,247 +6,247 @@ * 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 { Issue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - IssueContract, - IssueListByServiceNextOptionalParams, - IssueListByServiceOptionalParams, - IssueListByServiceResponse, - IssueGetOptionalParams, - IssueGetResponse, - IssueListByServiceNextResponse -} from "../models"; + IssueContract, + IssueGetOptionalParams, + IssueGetResponse, + IssueListByServiceNextOptionalParams, + IssueListByServiceNextResponse, + IssueListByServiceOptionalParams, + IssueListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Issue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Issue operations. */ export class IssueImpl implements Issue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Issue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Issue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: IssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IssueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, issueId, options }, - getOperationSpec - ); - } + /** + * Gets API Management issue details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, issueId, options }, + getOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IssueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: IssueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.IssueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueContract, + headersMapper: Mappers.IssueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.issueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.issueId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IssueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts index 626d49673b05..fb61e9748ded 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts @@ -6,457 +6,457 @@ * 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 { Logger } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - LoggerContract, - LoggerListByServiceNextOptionalParams, - LoggerListByServiceOptionalParams, - LoggerListByServiceResponse, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams, - LoggerListByServiceNextResponse -} from "../models"; + LoggerContract, + LoggerCreateOrUpdateOptionalParams, + LoggerCreateOrUpdateResponse, + LoggerDeleteOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetEntityTagResponse, + LoggerGetOptionalParams, + LoggerGetResponse, + LoggerListByServiceNextOptionalParams, + LoggerListByServiceNextResponse, + LoggerListByServiceOptionalParams, + LoggerListByServiceResponse, + LoggerUpdateContract, + LoggerUpdateOptionalParams, + LoggerUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Logger } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Logger operations. */ export class LoggerImpl implements Logger { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Logger class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Logger class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: LoggerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LoggerListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + loggerId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, loggerId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: LoggerListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: LoggerListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.LoggerGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.LoggerGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters51, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters51, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LoggerContract, + headersMapper: Mappers.LoggerUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters52, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters52, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.loggerId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.loggerId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LoggerCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts index c15754457817..8db01415f635 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts @@ -6,834 +6,834 @@ * 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 { NamedValue } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - NamedValueContract, - NamedValueListByServiceNextOptionalParams, - NamedValueListByServiceOptionalParams, - NamedValueListByServiceResponse, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse, - NamedValueListByServiceNextResponse -} from "../models"; + NamedValueContract, + NamedValueCreateContract, + NamedValueCreateOrUpdateOptionalParams, + NamedValueCreateOrUpdateResponse, + NamedValueDeleteOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetEntityTagResponse, + NamedValueGetOptionalParams, + NamedValueGetResponse, + NamedValueListByServiceNextOptionalParams, + NamedValueListByServiceNextResponse, + NamedValueListByServiceOptionalParams, + NamedValueListByServiceResponse, + NamedValueListValueOptionalParams, + NamedValueListValueResponse, + NamedValueRefreshSecretOptionalParams, + NamedValueRefreshSecretResponse, + NamedValueUpdateOptionalParams, + NamedValueUpdateParameters, + NamedValueUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NamedValue } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing NamedValue operations. */ export class NamedValueImpl implements NamedValue { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NamedValue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NamedValue class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: NamedValueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NamedValueListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + getOperationSpec + ); + } - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueCreateOrUpdateResponse + > + > { + 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, - serviceName, - namedValueId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - NamedValueCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + namedValueId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + NamedValueCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - namedValueId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + namedValueId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueUpdateResponse + > + > { + 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, - serviceName, - namedValueId, - ifMatch, - parameters, - options - }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - NamedValueUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NamedValueUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific named value from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - listValueOperationSpec - ); - } + /** + * Gets the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + listValue( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, namedValueId, options }, + listValueOperationSpec + ); + } - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - > { - 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() - } - }; - }; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + async beginRefreshSecret( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueRefreshSecretResponse + > + > { + 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, serviceName, namedValueId, options }, - spec: refreshSecretOperationSpec - }); - const poller = await createHttpPoller< - NamedValueRefreshSecretResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, namedValueId, options }, + spec: refreshSecretOperationSpec + }); + const poller = await createHttpPoller< + NamedValueRefreshSecretResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise { - const poller = await this.beginRefreshSecret( - resourceGroupName, - serviceName, - namedValueId, - options - ); - return poller.pollUntilDone(); - } + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + async beginRefreshSecretAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise { + const poller = await this.beginRefreshSecret( + resourceGroupName, + serviceName, + namedValueId, + options + ); + return poller.pollUntilDone(); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NamedValueListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: NamedValueListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.isKeyVaultRefreshFailed - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.isKeyVaultRefreshFailed + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.NamedValueGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.NamedValueGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters53, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters54, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters54, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listValueOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueSecretContract, - headersMapper: Mappers.NamedValueListValueHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NamedValueSecretContract, + headersMapper: Mappers.NamedValueListValueHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 201: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 202: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + 204: { + bodyMapper: Mappers.NamedValueContract, + headersMapper: Mappers.NamedValueRefreshSecretHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.namedValueId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.namedValueId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NamedValueCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts index 8f9ab94e7fee..f17d2ee0938f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts @@ -6,124 +6,124 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NetworkStatus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse -} from "../models"; + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByLocationResponse, + NetworkStatusListByServiceOptionalParams, + NetworkStatusListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NetworkStatus } from "../operationsInterfaces/index.js"; /** Class containing NetworkStatus operations. */ export class NetworkStatusImpl implements NetworkStatus { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NetworkStatus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NetworkStatus class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, locationName, options }, - listByLocationOperationSpec - ); - } + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param locationName Location in which the API Management service is deployed. This is one of the + * Azure Regions like West US, East US, South Central US. + * @param options The options parameters. + */ + listByLocation( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, locationName, options }, + listByLocationOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkStatusContractByLocation" + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkStatusContractByLocation" + } + } + } } - } + }, + default: { + bodyMapper: Mappers.ErrorResponse } - } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkStatusContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkStatusContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts index 330f9607e8cb..bc60fd68156a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts @@ -6,286 +6,286 @@ * 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 { Notification } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationContract, - NotificationListByServiceNextOptionalParams, - NotificationListByServiceOptionalParams, - NotificationListByServiceResponse, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse, - NotificationListByServiceNextResponse -} from "../models"; + NotificationContract, + NotificationCreateOrUpdateOptionalParams, + NotificationCreateOrUpdateResponse, + NotificationGetOptionalParams, + NotificationGetResponse, + NotificationListByServiceNextOptionalParams, + NotificationListByServiceNextResponse, + NotificationListByServiceOptionalParams, + NotificationListByServiceResponse, + NotificationName +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Notification } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Notification operations. */ export class NotificationImpl implements Notification { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Notification class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Notification class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: NotificationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NotificationListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Notification specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + getOperationSpec + ); + } - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update API Management publisher notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + createOrUpdateOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NotificationListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: NotificationListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NotificationContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept, Parameters.ifMatch], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NotificationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts index 5532326268f3..82b808a3e38e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts @@ -6,213 +6,213 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NotificationRecipientEmail } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailCheckEntityExistsResponse, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCreateOrUpdateResponse, + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, + NotificationRecipientEmailListByNotificationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NotificationRecipientEmail } from "../operationsInterfaces/index.js"; /** Class containing NotificationRecipientEmail operations. */ export class NotificationRecipientEmailImpl - implements NotificationRecipientEmail { - private readonly client: ApiManagementClient; + implements NotificationRecipientEmail { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NotificationRecipientEmail class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NotificationRecipientEmail class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec - ); - } + /** + * Gets the list of the Notification Recipient Emails subscribed to a notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + listByNotificationOperationSpec + ); + } - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Determine if Notification Recipient Email subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the Email address to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - deleteOperationSpec - ); - } + /** + * Removes the email from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, email, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecipientEmailCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailContract - }, - 201: { - bodyMapper: Mappers.RecipientEmailContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RecipientEmailContract + }, + 201: { + bodyMapper: Mappers.RecipientEmailContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName, - Parameters.email - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName, + Parameters.email + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts index ff459bec71fd..7bef593e9429 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts @@ -6,213 +6,213 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { NotificationRecipientUser } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserCheckEntityExistsResponse, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCreateOrUpdateResponse, + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, + NotificationRecipientUserListByNotificationResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { NotificationRecipientUser } from "../operationsInterfaces/index.js"; /** Class containing NotificationRecipientUser operations. */ export class NotificationRecipientUserImpl - implements NotificationRecipientUser { - private readonly client: ApiManagementClient; + implements NotificationRecipientUser { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class NotificationRecipientUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class NotificationRecipientUser class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec - ); - } + /** + * Gets the list of the Notification Recipient User subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, options }, + listByNotificationOperationSpec + ); + } - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Determine if the Notification Recipient User is subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the API Management User to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - deleteOperationSpec - ); - } + /** + * Removes the API Management user from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, notificationName, userId, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecipientUserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "HEAD", + responses: { + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserContract - }, - 201: { - bodyMapper: Mappers.RecipientUserContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RecipientUserContract + }, + 201: { + bodyMapper: Mappers.RecipientUserContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.notificationName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.notificationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts index 6f214aac252c..b920960541ce 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts @@ -6,495 +6,495 @@ * 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 { OpenIdConnectProvider } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceNextOptionalParams, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderListByServiceResponse, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse, - OpenIdConnectProviderListByServiceNextResponse -} from "../models"; + OpenidConnectProviderContract, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateResponse, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetEntityTagResponse, + OpenIdConnectProviderGetOptionalParams, + OpenIdConnectProviderGetResponse, + OpenIdConnectProviderListByServiceNextOptionalParams, + OpenIdConnectProviderListByServiceNextResponse, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderListByServiceResponse, + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListSecretsResponse, + OpenidConnectProviderUpdateContract, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OpenIdConnectProvider } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing OpenIdConnectProvider operations. */ export class OpenIdConnectProviderImpl implements OpenIdConnectProvider { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OpenIdConnectProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OpenIdConnectProvider class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OpenIdConnectProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OpenIdConnectProviderListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getOperationSpec - ); - } + /** + * Gets specific OpenID Connect Provider without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + getOperationSpec + ); + } - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the specific OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific OpenID Connect Provider of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the client secret details of the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, opid, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: OpenIdConnectProviderListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: OpenIdConnectProviderListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenIdConnectProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.OpenIdConnectProviderGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.OpenIdConnectProviderGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters55, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.OpenidConnectProviderContract, + headersMapper: Mappers.OpenIdConnectProviderUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters56, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.OpenIdConnectProviderListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ClientSecretContract, + headersMapper: Mappers.OpenIdConnectProviderListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.opid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.opid + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OpenIdConnectProviderCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts index 91d1fdf3b4ec..f6dd2ea3f436 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts @@ -6,221 +6,221 @@ * 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 { OperationOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagResourceContract, - OperationListByTagsNextOptionalParams, - OperationListByTagsOptionalParams, - OperationListByTagsResponse, - OperationListByTagsNextResponse -} from "../models"; + OperationListByTagsNextOptionalParams, + OperationListByTagsNextResponse, + OperationListByTagsOptionalParams, + OperationListByTagsResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OperationOperations } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing OperationOperations operations. */ export class OperationOperationsImpl implements OperationOperations { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OperationOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OperationOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - apiId, - 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.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + apiId, + options ); - } - }; - } - - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByTagsPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByTagsOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: OperationListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: OperationListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedOperations - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedOperations + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts index 5ac8f335aa65..0fc05ce43598 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts @@ -6,68 +6,68 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { OutboundNetworkDependenciesEndpoints } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse -} from "../models"; + OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + OutboundNetworkDependenciesEndpointsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { OutboundNetworkDependenciesEndpoints } from "../operationsInterfaces/index.js"; /** Class containing OutboundNetworkDependenciesEndpoints operations. */ export class OutboundNetworkDependenciesEndpointsImpl - implements OutboundNetworkDependenciesEndpoints { - private readonly client: ApiManagementClient; + implements OutboundNetworkDependenciesEndpoints { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class OutboundNetworkDependenciesEndpoints class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class OutboundNetworkDependenciesEndpoints class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets the network endpoints of all outbound dependencies of a ApiManagement service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OutboundEnvironmentEndpointList + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts index d278cdfc55fc..6fd830567cce 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts @@ -6,260 +6,260 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Policy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyListByServiceOptionalParams, - PolicyListByServiceResponse, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyContract, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyCreateOrUpdateOptionalParams, + PolicyCreateOrUpdateResponse, + PolicyDeleteOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetEntityTagResponse, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyIdName, + PolicyListByServiceOptionalParams, + PolicyListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Policy } from "../operationsInterfaces/index.js"; /** Class containing Policy operations. */ export class PolicyImpl implements Policy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Policy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Policy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all the Global Policy definitions of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getOperationSpec - ); - } + /** + * Get the Global policy definition of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the global policy configuration of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the global policy configuration of the Api Management Service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.PolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts index 2f563e88f50e..f1ce19fe858a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts @@ -6,67 +6,67 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PolicyDescription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse -} from "../models"; + PolicyDescriptionListByServiceOptionalParams, + PolicyDescriptionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PolicyDescription } from "../operationsInterfaces/index.js"; /** Class containing PolicyDescription operations. */ export class PolicyDescriptionImpl implements PolicyDescription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PolicyDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PolicyDescription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all policy descriptions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyDescriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyDescriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.scope1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.scope1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts index b6d25f5fb6b7..14db9818e03b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts @@ -6,403 +6,403 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PolicyFragment } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + OperationState, + SimplePollerLike, + createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentListByServiceResponse, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentContract, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse -} from "../models"; + PolicyFragmentContract, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentCreateOrUpdateResponse, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetEntityTagResponse, + PolicyFragmentGetOptionalParams, + PolicyFragmentGetResponse, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentListByServiceResponse, + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListReferencesResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PolicyFragment } from "../operationsInterfaces/index.js"; /** Class containing PolicyFragment operations. */ export class PolicyFragmentImpl implements PolicyFragment { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PolicyFragment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PolicyFragment class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Gets all policy fragments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getOperationSpec - ); - } + /** + * Gets a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + getOperationSpec + ); + } - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PolicyFragmentCreateOrUpdateResponse + > + > { + 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, serviceName, id, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PolicyFragmentCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, id, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PolicyFragmentCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - id, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + id, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - listReferencesOperationSpec - ); - } + /** + * Lists policy resources that reference the policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + listReferences( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, id, options }, + listReferencesOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyFragmentGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PolicyFragmentGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PolicyFragmentContract, + headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters57, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters57, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listReferencesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.top, Parameters.skip, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts index 4c13b4be9ea9..01bce60c1a89 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts @@ -6,281 +6,281 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PortalConfig } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PortalConfigListByServiceOptionalParams, - PortalConfigListByServiceResponse, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigContract, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse -} from "../models"; + PortalConfigContract, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigCreateOrUpdateResponse, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetEntityTagResponse, + PortalConfigGetOptionalParams, + PortalConfigGetResponse, + PortalConfigListByServiceOptionalParams, + PortalConfigListByServiceResponse, + PortalConfigUpdateOptionalParams, + PortalConfigUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalConfig } from "../operationsInterfaces/index.js"; /** Class containing PortalConfig operations. */ export class PortalConfigImpl implements PortalConfig { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalConfig class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalConfig class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists the developer portal configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalConfigId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getOperationSpec - ); - } + /** + * Get the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalConfigId, options }, + getOperationSpec + ); + } - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Create or update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalConfigGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PortalConfigGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract, - headersMapper: Mappers.PortalConfigGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract, + headersMapper: Mappers.PortalConfigGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters58, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalConfigContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalConfigId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters58, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalConfigId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts index 06c82783efdc..1f900cf4ced6 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts @@ -6,611 +6,611 @@ * 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 { PortalRevision } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PortalRevisionContract, - PortalRevisionListByServiceNextOptionalParams, - PortalRevisionListByServiceOptionalParams, - PortalRevisionListByServiceResponse, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse, - PortalRevisionListByServiceNextResponse -} from "../models"; + PortalRevisionContract, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionCreateOrUpdateResponse, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetEntityTagResponse, + PortalRevisionGetOptionalParams, + PortalRevisionGetResponse, + PortalRevisionListByServiceNextOptionalParams, + PortalRevisionListByServiceNextResponse, + PortalRevisionListByServiceOptionalParams, + PortalRevisionListByServiceResponse, + PortalRevisionUpdateOptionalParams, + PortalRevisionUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalRevision } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing PortalRevision operations. */ export class PortalRevisionImpl implements PortalRevision { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalRevision class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: PortalRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PortalRevisionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the developer portal revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalRevisionId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getOperationSpec - ); - } + /** + * Gets the developer portal's revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, portalRevisionId, options }, + getOperationSpec + ); + } - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionCreateOrUpdateResponse + > + > { + 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, - serviceName, - portalRevisionId, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PortalRevisionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PortalRevisionCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionUpdateResponse + > + > { + 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, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options - }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - PortalRevisionUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PortalRevisionUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PortalRevisionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: PortalRevisionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalRevisionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.PortalRevisionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters59, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 202: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + 204: { + bodyMapper: Mappers.PortalRevisionContract, + headersMapper: Mappers.PortalRevisionUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.portalRevisionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters59, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.portalRevisionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalRevisionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts index da437e49d95b..57cce1d876c5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts @@ -6,67 +6,67 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PortalSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse -} from "../models"; + PortalSettingsListByServiceOptionalParams, + PortalSettingsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PortalSettings } from "../operationsInterfaces/index.js"; /** Class containing PortalSettings operations. */ export class PortalSettingsImpl implements PortalSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PortalSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PortalSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of portalsettings defined within a service instance.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingsCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts index e8e90e2250a0..ddc60f1ee851 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts @@ -6,533 +6,533 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnectionOperations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + createHttpPoller, + OperationState, + SimplePollerLike } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionListByServiceResponse, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse -} from "../models"; + PrivateEndpointConnection, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionCreateOrUpdateResponse, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, + PrivateEndpointConnectionGetByNameResponse, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceResponse, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionListByServiceResponse, + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesResponse, + PrivateEndpointConnectionRequest +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { PrivateEndpointConnectionOperations } from "../operationsInterfaces/index.js"; /// /** Class containing PrivateEndpointConnectionOperations operations. */ export class PrivateEndpointConnectionOperationsImpl - implements PrivateEndpointConnectionOperations { - private readonly client: ApiManagementClient; + implements PrivateEndpointConnectionOperations { + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class PrivateEndpointConnectionOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class PrivateEndpointConnectionOperations class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; + } - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateEndpointConnectionListByServiceResponse; - result = await this._listByService(resourceGroupName, serviceName, options); - yield result.value || []; - } + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: PrivateEndpointConnectionListByServiceResponse; + result = await this._listByService(resourceGroupName, serviceName, options); + yield result.value || []; + } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options - }, - getByNameOperationSpec - ); - } + /** + * Gets the details of the Private Endpoint Connection specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + getByName( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + }, + getByNameOperationSpec + ); + } - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - > { - 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() - } - }; - }; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionCreateOrUpdateResponse + > + > { + 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, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PrivateEndpointConnectionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options - ); - return poller.pollUntilDone(); - } + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options + ); + return poller.pollUntilDone(); + } - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): 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() - } - }; - }; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): 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, - serviceName, - privateEndpointConnectionName, - options - }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options - ); - return poller.pollUntilDone(); - } + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listPrivateLinkResourcesOperationSpec - ); - } + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listPrivateLinkResources( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listPrivateLinkResourcesOperationSpec + ); + } - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, privateLinkSubResourceName, options }, - getPrivateLinkResourceOperationSpec - ); - } + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateLinkSubResourceName Name of the private link resource. + * @param options The options parameters. + */ + getPrivateLinkResource( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, privateLinkSubResourceName, options }, + getPrivateLinkResourceOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getByNameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 201: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 204: { - bodyMapper: Mappers.PrivateEndpointConnection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.privateEndpointConnectionRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.privateEndpointConnectionRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + headerParameters: [Parameters.accept], + serializer }; const listPrivateLinkResourcesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getPrivateLinkResourceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.privateLinkSubResourceName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.privateLinkSubResourceName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts b/sdk/apimanagement/arm-apimanagement/src/operations/product.ts index cd7bdd87c103..0c5481f1d4ee 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/product.ts @@ -6,629 +6,629 @@ * 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 { Product } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductContract, - ProductListByServiceNextOptionalParams, - ProductListByServiceOptionalParams, - ProductListByServiceResponse, - TagResourceContract, - ProductListByTagsNextOptionalParams, - ProductListByTagsOptionalParams, - ProductListByTagsResponse, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams, - ProductListByServiceNextResponse, - ProductListByTagsNextResponse -} from "../models"; + ProductContract, + ProductCreateOrUpdateOptionalParams, + ProductCreateOrUpdateResponse, + ProductDeleteOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetEntityTagResponse, + ProductGetOptionalParams, + ProductGetResponse, + ProductListByServiceNextOptionalParams, + ProductListByServiceNextResponse, + ProductListByServiceOptionalParams, + ProductListByServiceResponse, + ProductListByTagsNextOptionalParams, + ProductListByTagsNextResponse, + ProductListByTagsOptionalParams, + ProductListByTagsResponse, + ProductUpdateOptionalParams, + ProductUpdateParameters, + ProductUpdateResponse, + TagResourceContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Product } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Product operations. */ export class ProductImpl implements Product { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Product class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Product class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - 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."); + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTagsPagingAll( + resourceGroupName, + serviceName, + 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.listByTagsPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByTagsPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductListByTagsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTags(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTagsNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByTagsPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTagsPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update existing product details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Delete product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec - ); - } + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByTagsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ProductListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByTagsNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec - ); - } + /** + * ListByTagsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTags method. + * @param options The options parameters. + */ + private _listByTagsNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ProductListByTagsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTagsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.apiVersion, - Parameters.expandGroups - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.tags, + Parameters.apiVersion, + Parameters.expandGroups + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters63, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters63, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ProductContract, + headersMapper: Mappers.ProductUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters64, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters64, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.includeNotTaggedProducts - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.includeNotTaggedProducts + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProductCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts index 46a14b1d5042..29c964ffbbe1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts @@ -6,360 +6,360 @@ * 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 { ProductApi } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ApiContract, - ProductApiListByProductNextOptionalParams, - ProductApiListByProductOptionalParams, - ProductApiListByProductResponse, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams, - ProductApiListByProductNextResponse -} from "../models"; + ApiContract, + ProductApiCheckEntityExistsOptionalParams, + ProductApiCheckEntityExistsResponse, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCreateOrUpdateResponse, + ProductApiDeleteOptionalParams, + ProductApiListByProductNextOptionalParams, + ProductApiListByProductNextResponse, + ProductApiListByProductOptionalParams, + ProductApiListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductApi } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductApi operations. */ export class ProductApiImpl implements ProductApi { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductApi class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - 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.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductApiListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductApiListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that API entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds an API to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified API from the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, apiId, options }, + deleteOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductApiListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductApiListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "HEAD", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract - }, - 201: { - bodyMapper: Mappers.ApiContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApiContract + }, + 201: { + bodyMapper: Mappers.ApiContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApiCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts index 5425cb6d2633..84ea63c6060b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts @@ -6,357 +6,357 @@ * 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 { ProductGroup } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - ProductGroupListByProductNextOptionalParams, - ProductGroupListByProductOptionalParams, - ProductGroupListByProductResponse, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams, - ProductGroupListByProductNextResponse -} from "../models"; + GroupContract, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupCheckEntityExistsResponse, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCreateOrUpdateResponse, + ProductGroupDeleteOptionalParams, + ProductGroupListByProductNextOptionalParams, + ProductGroupListByProductNextResponse, + ProductGroupListByProductOptionalParams, + ProductGroupListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductGroup } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductGroup operations. */ export class ProductGroupImpl implements ProductGroup { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductGroup class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - 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.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductGroupListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductGroupListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - checkEntityExistsOperationSpec - ); - } + /** + * Checks that Group entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + checkEntityExistsOperationSpec + ); + } - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - createOrUpdateOperationSpec - ); - } + /** + * Adds the association between the specified developer group with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - deleteOperationSpec - ); - } + /** + * Deletes the association between the specified group and product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, groupId, options }, + deleteOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductGroupListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductGroupListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "HEAD", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract - }, - 201: { - bodyMapper: Mappers.GroupContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GroupContract + }, + 201: { + bodyMapper: Mappers.GroupContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId, - Parameters.groupId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId, + Parameters.groupId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts index 265d5f5708b5..f9cfa18a780e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts @@ -6,282 +6,282 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ProductPolicy } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductPolicyListByProductOptionalParams, - ProductPolicyListByProductResponse, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - PolicyContract, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyIdName, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyCreateOrUpdateResponse, + ProductPolicyDeleteOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetEntityTagResponse, + ProductPolicyGetOptionalParams, + ProductPolicyGetResponse, + ProductPolicyListByProductOptionalParams, + ProductPolicyListByProductResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductPolicy } from "../operationsInterfaces/index.js"; /** Class containing ProductPolicy operations. */ export class ProductPolicyImpl implements ProductPolicy { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductPolicy class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getEntityTagOperationSpec - ); - } + /** + * Get the ETag of the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, options }, + getEntityTagOperationSpec + ); + } - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getOperationSpec - ); - } + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, options }, + getOperationSpec + ); + } - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - policyId, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates policy configuration for the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + policyId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the policy configuration at the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, policyId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductPolicyGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductPolicyGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion, Parameters.format], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.PolicyContract, + headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.policyId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.policyId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts index b602e9ea6996..9550a61cd960 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts @@ -6,217 +6,217 @@ * 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 { ProductSubscriptions } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - ProductSubscriptionsListNextOptionalParams, - ProductSubscriptionsListOptionalParams, - ProductSubscriptionsListResponse, - ProductSubscriptionsListNextResponse -} from "../models"; + ProductSubscriptionsListNextOptionalParams, + ProductSubscriptionsListNextResponse, + ProductSubscriptionsListOptionalParams, + ProductSubscriptionsListResponse, + SubscriptionContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductSubscriptions } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductSubscriptions operations. */ export class ProductSubscriptionsImpl implements ProductSubscriptions { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductSubscriptions class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductSubscriptions class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - 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( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductSubscriptionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductSubscriptionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec - ); - } + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductSubscriptionsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductSubscriptionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts index 48c1fc393861..2f2bd690dbff 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts @@ -6,282 +6,282 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ProductWiki } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams -} from "../models"; + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiCreateOrUpdateResponse, + ProductWikiDeleteOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetEntityTagResponse, + ProductWikiGetOptionalParams, + ProductWikiGetResponse, + ProductWikiUpdateOptionalParams, + ProductWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductWiki } from "../operationsInterfaces/index.js"; /** Class containing ProductWiki operations. */ export class ProductWikiImpl implements ProductWiki { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductWiki class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + getOperationSpec + ); + } - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a new Wiki for a Product or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified Wiki from a Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, ifMatch, options }, + deleteOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductWikiGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.ProductWikiGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.WikiContract, + headersMapper: Mappers.ProductWikiUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts index eb425ad22260..d7fd88b86632 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts @@ -6,219 +6,219 @@ * 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 { ProductWikis } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - WikiContract, - ProductWikisListNextOptionalParams, - ProductWikisListOptionalParams, - ProductWikisListResponse, - ProductWikisListNextResponse -} from "../models"; + ProductWikisListNextOptionalParams, + ProductWikisListNextResponse, + ProductWikisListOptionalParams, + ProductWikisListResponse, + WikiContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ProductWikis } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing ProductWikis operations. */ export class ProductWikisImpl implements ProductWikis { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class ProductWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class ProductWikis class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - 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( - resourceGroupName, - serviceName, - productId, - options, - settings + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + productId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProductWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ProductWikisListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; + } } - } - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec - ); - } + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductWikisListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: ProductWikisListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection, + headersMapper: Mappers.ProductWikisListHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListNextHeaders + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WikiCollection, + headersMapper: Mappers.ProductWikisListNextHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts index 136caaa802f2..3af153c506ec 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts @@ -6,127 +6,127 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { QuotaByCounterKeys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse -} from "../models"; + QuotaByCounterKeysListByServiceOptionalParams, + QuotaByCounterKeysListByServiceResponse, + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { QuotaByCounterKeys } from "../operationsInterfaces/index.js"; /** Class containing QuotaByCounterKeys operations. */ export class QuotaByCounterKeysImpl implements QuotaByCounterKeys { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class QuotaByCounterKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class QuotaByCounterKeys class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of current quota counter periods associated with the counter-key configured in + * the policy on the specified service instance. The api does not support paging yet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, quotaCounterKey, options }, + listByServiceOperationSpec + ); + } - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates all the quota counter values specified with the existing quota counter key to a value in the + * specified service instance. This should be used for reset of the quota counter values. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param parameters The value of the quota counter to be applied to all quota counter periods. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, quotaCounterKey, parameters, options }, + updateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters65, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts index bd18bc65745b..7617a3b80c70 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts @@ -6,145 +6,145 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { QuotaByPeriodKeys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse -} from "../models"; + QuotaByPeriodKeysGetOptionalParams, + QuotaByPeriodKeysGetResponse, + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { QuotaByPeriodKeys } from "../operationsInterfaces/index.js"; /** Class containing QuotaByPeriodKeys operations. */ export class QuotaByPeriodKeysImpl implements QuotaByPeriodKeys { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class QuotaByPeriodKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class QuotaByPeriodKeys class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - options - }, - getOperationSpec - ); - } + /** + * Gets the value of the quota counter associated with the counter-key in the policy for the specific + * period in service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + options + }, + getOperationSpec + ); + } - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Updates an existing quota counter value in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param parameters The value of the Quota counter to be applied on the specified period. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters, + options + }, + updateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey, + Parameters.quotaPeriodKey + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.QuotaCounterContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters65, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.quotaCounterKey, + Parameters.quotaPeriodKey + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts b/sdk/apimanagement/arm-apimanagement/src/operations/region.ts index b0ccf6b4bde2..db172c948a07 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/region.ts @@ -6,197 +6,197 @@ * 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 { Region } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - RegionContract, - RegionListByServiceNextOptionalParams, - RegionListByServiceOptionalParams, - RegionListByServiceResponse, - RegionListByServiceNextResponse -} from "../models"; + RegionContract, + RegionListByServiceNextOptionalParams, + RegionListByServiceNextResponse, + RegionListByServiceOptionalParams, + RegionListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Region } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Region operations. */ export class RegionImpl implements Region { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Region class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Region class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: RegionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: RegionListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: RegionListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: RegionListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RegionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts index 34ec22b941f4..309a788b2077 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts @@ -6,1590 +6,1590 @@ * 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 { Reports } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - ReportRecordContract, - ReportsListByApiNextOptionalParams, - ReportsListByApiOptionalParams, - ReportsListByApiResponse, - ReportsListByUserNextOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByUserResponse, - ReportsListByOperationNextOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByOperationResponse, - ReportsListByProductNextOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByProductResponse, - ReportsListByGeoNextOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListByGeoResponse, - ReportsListBySubscriptionNextOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListBySubscriptionResponse, - ReportsListByTimeNextOptionalParams, - ReportsListByTimeOptionalParams, - ReportsListByTimeResponse, - RequestReportRecordContract, - ReportsListByRequestOptionalParams, - ReportsListByRequestResponse, - ReportsListByApiNextResponse, - ReportsListByUserNextResponse, - ReportsListByOperationNextResponse, - ReportsListByProductNextResponse, - ReportsListByGeoNextResponse, - ReportsListBySubscriptionNextResponse, - ReportsListByTimeNextResponse -} from "../models"; + ReportRecordContract, + ReportsListByApiNextOptionalParams, + ReportsListByApiNextResponse, + ReportsListByApiOptionalParams, + ReportsListByApiResponse, + ReportsListByGeoNextOptionalParams, + ReportsListByGeoNextResponse, + ReportsListByGeoOptionalParams, + ReportsListByGeoResponse, + ReportsListByOperationNextOptionalParams, + ReportsListByOperationNextResponse, + ReportsListByOperationOptionalParams, + ReportsListByOperationResponse, + ReportsListByProductNextOptionalParams, + ReportsListByProductNextResponse, + ReportsListByProductOptionalParams, + ReportsListByProductResponse, + ReportsListByRequestOptionalParams, + ReportsListByRequestResponse, + ReportsListBySubscriptionNextOptionalParams, + ReportsListBySubscriptionNextResponse, + ReportsListBySubscriptionOptionalParams, + ReportsListBySubscriptionResponse, + ReportsListByTimeNextOptionalParams, + ReportsListByTimeNextResponse, + ReportsListByTimeOptionalParams, + ReportsListByTimeResponse, + ReportsListByUserNextOptionalParams, + ReportsListByUserNextResponse, + ReportsListByUserOptionalParams, + ReportsListByUserResponse, + RequestReportRecordContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Reports } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Reports operations. */ export class ReportsImpl implements Reports { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Reports class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Reports class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - filter, - 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.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + 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.listByApiPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - public listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByUserPagingAll( - resourceGroupName, - serviceName, - filter, - 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."); + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByUserPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByUserResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByUser( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByUserNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByUserPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + public listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByUserPagingAll( + resourceGroupName, + serviceName, + filter, + 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.listByUserPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - filter, - 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."); + private async *listByUserPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByUserResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByUser( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByUserNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByUserPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByUserPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - filter, - 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.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByOperationPagingAll( + resourceGroupName, + serviceName, + filter, + options ); - } - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + 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.listByOperationPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByOperationPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByOperation( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByOperationNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByGeoPagingAll( - resourceGroupName, - serviceName, - filter, - 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."); + private async *listByOperationPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByOperationPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings - ); - } - }; - } - - private async *listByGeoPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByGeoResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByGeo( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; } - while (continuationToken) { - result = await this._listByGeoNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + filter, + 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.listByProductPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - private async *listByGeoPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll( - resourceGroupName, - serviceName, - filter, - 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."); + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; } - return this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + } + + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGeoPagingAll( + resourceGroupName, + serviceName, + filter, + 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.listByGeoPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; + } - private async *listBySubscriptionPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription( - resourceGroupName, - serviceName, - filter, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listByGeoPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByGeoResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByGeo( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByGeoNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - while (continuationToken) { - result = await this._listBySubscriptionNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByGeoPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGeoPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - private async *listBySubscriptionPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + public listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll( + resourceGroupName, + serviceName, + filter, + 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( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; } - } - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - public listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByTimePagingAll( - resourceGroupName, - serviceName, - filter, - interval, - 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."); + private async *listBySubscriptionPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription( + resourceGroupName, + serviceName, + filter, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options, - settings - ); - } - }; - } + while (continuationToken) { + result = await this._listBySubscriptionNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } - private async *listByTimePagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByTimeResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTime( - resourceGroupName, - serviceName, - filter, - interval, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listBySubscriptionPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - while (continuationToken) { - result = await this._listByTimeNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + public listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTimePagingAll( + resourceGroupName, + serviceName, + filter, + interval, + 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.listByTimePagingPage( + resourceGroupName, + serviceName, + filter, + interval, + options, + settings + ); + } + }; } - } - private async *listByTimePagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options - )) { - yield* page; + private async *listByTimePagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByTimeResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTime( + resourceGroupName, + serviceName, + filter, + interval, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTimeNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - public listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByRequestPagingAll( - resourceGroupName, - serviceName, - filter, - 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."); + private async *listByTimePagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTimePagingPage( + resourceGroupName, + serviceName, + filter, + interval, + options + )) { + yield* page; } - return this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings + } + + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + public listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRequestPagingAll( + resourceGroupName, + serviceName, + filter, + 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.listByRequestPagingPage( + resourceGroupName, + serviceName, + filter, + options, + settings + ); + } + }; + } - private async *listByRequestPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ReportsListByRequestResponse; - result = await this._listByRequest( - resourceGroupName, - serviceName, - filter, - options - ); - yield result.value || []; - } + private async *listByRequestPagingPage( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: ReportsListByRequestResponse; + result = await this._listByRequest( + resourceGroupName, + serviceName, + filter, + options + ); + yield result.value || []; + } - private async *listByRequestPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options - )) { - yield* page; + private async *listByRequestPagingAll( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRequestPagingPage( + resourceGroupName, + serviceName, + filter, + options + )) { + yield* page; + } } - } - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByApiOperationSpec - ); - } + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByApiOperationSpec + ); + } - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - private _listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByUserOperationSpec - ); - } + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + private _listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByUserOperationSpec + ); + } - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByOperationOperationSpec - ); - } + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByOperationOperationSpec + ); + } - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByProductOperationSpec - ); - } + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByProductOperationSpec + ); + } - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByGeoOperationSpec - ); - } + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByGeoOperationSpec + ); + } - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listBySubscriptionOperationSpec - ); - } + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + private _listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listBySubscriptionOperationSpec + ); + } - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - private _listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, interval, options }, - listByTimeOperationSpec - ); - } + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + private _listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, interval, options }, + listByTimeOperationSpec + ); + } - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - private _listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByRequestOperationSpec - ); - } + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + private _listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, filter, options }, + listByRequestOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByApiNextOperationSpec + ); + } - /** - * ListByUserNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByUser method. - * @param options The options parameters. - */ - private _listByUserNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByUserNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByUserNextOperationSpec - ); - } + /** + * ListByUserNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByUser method. + * @param options The options parameters. + */ + private _listByUserNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByUserNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByUserNextOperationSpec + ); + } - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByOperationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByOperationNextOperationSpec - ); - } + /** + * ListByOperationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByOperation method. + * @param options The options parameters. + */ + private _listByOperationNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByOperationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByOperationNextOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByProductNextOperationSpec + ); + } - /** - * ListByGeoNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByGeo method. - * @param options The options parameters. - */ - private _listByGeoNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByGeoNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByGeoNextOperationSpec - ); - } + /** + * ListByGeoNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByGeo method. + * @param options The options parameters. + */ + private _listByGeoNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByGeoNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByGeoNextOperationSpec + ); + } - /** - * ListBySubscriptionNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } + /** + * ListBySubscriptionNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } - /** - * ListByTimeNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTime method. - * @param options The options parameters. - */ - private _listByTimeNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByTimeNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTimeNextOperationSpec - ); - } + /** + * ListByTimeNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByTime method. + * @param options The options parameters. + */ + private _listByTimeNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ReportsListByTimeNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByTimeNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByUserOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByGeoOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByTimeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.orderby, - Parameters.filter1, - Parameters.interval - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.orderby, + Parameters.filter1, + Parameters.interval + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByRequestOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RequestReportCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RequestReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.filter1 - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.filter1 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByUserNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByGeoNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByTimeNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReportCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts index 81c16f759dd7..f8863b9324fb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts @@ -6,208 +6,208 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SignInSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse -} from "../models"; + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsCreateOrUpdateResponse, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetEntityTagResponse, + SignInSettingsGetOptionalParams, + SignInSettingsGetResponse, + SignInSettingsUpdateOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { SignInSettings } from "../operationsInterfaces/index.js"; /** Class containing SignInSettings operations. */ export class SignInSettingsImpl implements SignInSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class SignInSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class SignInSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the SignInSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Sign In Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-In settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignInSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SignInSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings, - headersMapper: Mappers.SignInSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSigninSettings, + headersMapper: Mappers.SignInSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters60, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalSigninSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters60, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts index fa8160735c81..e46cf5f18d91 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts @@ -6,208 +6,208 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SignUpSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse -} from "../models"; + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsCreateOrUpdateResponse, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetEntityTagResponse, + SignUpSettingsGetOptionalParams, + SignUpSettingsGetResponse, + SignUpSettingsUpdateOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { SignUpSettings } from "../operationsInterfaces/index.js"; /** Class containing SignUpSettings operations. */ export class SignUpSettingsImpl implements SignUpSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class SignUpSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class SignUpSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the SignUpSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec - ); - } + /** + * Get Sign Up Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + getOperationSpec + ); + } - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-Up settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Create or Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, parameters, options }, + createOrUpdateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignUpSettingsGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SignUpSettingsGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings, - headersMapper: Mappers.SignUpSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PortalSignupSettings, + headersMapper: Mappers.SignUpSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "PATCH", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters61, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PortalSignupSettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters61, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts index 040781d07df3..f9024812cd17 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts @@ -6,586 +6,586 @@ * 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 { Subscription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - SubscriptionListNextOptionalParams, - SubscriptionListOptionalParams, - SubscriptionListResponse, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse, - SubscriptionListNextResponse -} from "../models"; + SubscriptionContract, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionCreateOrUpdateResponse, + SubscriptionCreateParameters, + SubscriptionDeleteOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetEntityTagResponse, + SubscriptionGetOptionalParams, + SubscriptionGetResponse, + SubscriptionListNextOptionalParams, + SubscriptionListNextResponse, + SubscriptionListOptionalParams, + SubscriptionListResponse, + SubscriptionListSecretsOptionalParams, + SubscriptionListSecretsResponse, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionUpdateParameters, + SubscriptionUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Subscription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Subscription operations. */ export class SubscriptionImpl implements Subscription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Subscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, serviceName, 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( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + /** + * Initialize a new instance of the class Subscription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: SubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, serviceName, 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( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SubscriptionListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listOperationSpec - ); - } + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getOperationSpec - ); - } + /** + * Gets the specified Subscription entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + getOperationSpec + ); + } - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or updates the subscription of specified user to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of a subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes the specified subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerates primary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerates secondary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + regenerateSecondaryKeyOperationSpec + ); + } - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - listSecretsOperationSpec - ); - } + /** + * Gets the specified Subscription keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, sid, options }, + listSecretsOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: SubscriptionListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: SubscriptionListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SubscriptionGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.SubscriptionGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters67, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters67, + queryParameters: [ + Parameters.apiVersion, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.SubscriptionUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters68, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters68, + queryParameters: [ + Parameters.apiVersion, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionKeysContract, - headersMapper: Mappers.SubscriptionListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionKeysContract, + headersMapper: Mappers.SubscriptionListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts index 1cd000ec1f2f..c8b60a7a6636 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts @@ -6,1632 +6,1632 @@ * 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 { Tag } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagContract, - TagListByOperationNextOptionalParams, - TagListByOperationOptionalParams, - TagListByOperationResponse, - TagListByApiNextOptionalParams, - TagListByApiOptionalParams, - TagListByApiResponse, - TagListByProductNextOptionalParams, - TagListByProductOptionalParams, - TagListByProductResponse, - TagListByServiceNextOptionalParams, - TagListByServiceOptionalParams, - TagListByServiceResponse, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams, - TagListByOperationNextResponse, - TagListByApiNextResponse, - TagListByProductNextResponse, - TagListByServiceNextResponse -} from "../models"; + TagAssignToApiOptionalParams, + TagAssignToApiResponse, + TagAssignToOperationOptionalParams, + TagAssignToOperationResponse, + TagAssignToProductOptionalParams, + TagAssignToProductResponse, + TagContract, + TagCreateOrUpdateOptionalParams, + TagCreateOrUpdateResponse, + TagCreateUpdateParameters, + TagDeleteOptionalParams, + TagDetachFromApiOptionalParams, + TagDetachFromOperationOptionalParams, + TagDetachFromProductOptionalParams, + TagGetByApiOptionalParams, + TagGetByApiResponse, + TagGetByOperationOptionalParams, + TagGetByOperationResponse, + TagGetByProductOptionalParams, + TagGetByProductResponse, + TagGetEntityStateByApiOptionalParams, + TagGetEntityStateByApiResponse, + TagGetEntityStateByOperationOptionalParams, + TagGetEntityStateByOperationResponse, + TagGetEntityStateByProductOptionalParams, + TagGetEntityStateByProductResponse, + TagGetEntityStateOptionalParams, + TagGetEntityStateResponse, + TagGetOptionalParams, + TagGetResponse, + TagListByApiNextOptionalParams, + TagListByApiNextResponse, + TagListByApiOptionalParams, + TagListByApiResponse, + TagListByOperationNextOptionalParams, + TagListByOperationNextResponse, + TagListByOperationOptionalParams, + TagListByOperationResponse, + TagListByProductNextOptionalParams, + TagListByProductNextResponse, + TagListByProductOptionalParams, + TagListByProductResponse, + TagListByServiceNextOptionalParams, + TagListByServiceNextResponse, + TagListByServiceOptionalParams, + TagListByServiceResponse, + TagUpdateOptionalParams, + TagUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { Tag } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing Tag operations. */ export class TagImpl implements Tag { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class Tag class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class Tag class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - apiId, - operationId, - 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.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - settings + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + public listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByOperationPagingAll( + resourceGroupName, + serviceName, + apiId, + operationId, + options ); - } - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByOperationPagingPage( + resourceGroupName, + serviceName, + apiId, + operationId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - apiId, - operationId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options - )) { - yield* page; + private async *listByOperationPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByOperation( + resourceGroupName, + serviceName, + apiId, + operationId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByOperationNext( + resourceGroupName, + serviceName, + apiId, + operationId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - 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."); + private async *listByOperationPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByOperationPagingPage( + resourceGroupName, + serviceName, + apiId, + operationId, + options + )) { + yield* page; } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings - ); - } - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; } - } - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options - )) { - yield* page; + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + public listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByApiPagingAll( + resourceGroupName, + serviceName, + apiId, + 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.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options, + settings + ); + } + }; } - } - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - 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."); + private async *listByApiPagingPage( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByApiResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByApi( + resourceGroupName, + serviceName, + apiId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings - ); - } - }; - } + while (continuationToken) { + result = await this._listByApiNext( + resourceGroupName, + serviceName, + apiId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + private async *listByApiPagingAll( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByApiPagingPage( + resourceGroupName, + serviceName, + apiId, + options + )) { + yield* page; + } } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByProductPagingAll( + resourceGroupName, + serviceName, + productId, + 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.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options, + settings + ); + } + }; } - } - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options - )) { - yield* page; + private async *listByProductPagingPage( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByProductResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByProduct( + resourceGroupName, + serviceName, + productId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByProductNext( + resourceGroupName, + serviceName, + productId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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."); + private async *listByProductPagingAll( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByProductPagingPage( + resourceGroupName, + serviceName, + productId, + options + )) { + yield* page; } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings - ); - } - }; - } + } - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec - ); - } + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + private _listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, options }, + listByOperationOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getEntityStateByOperationOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + getEntityStateByOperationOperationSpec + ); + } - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getByOperationOperationSpec - ); - } + /** + * Get tag associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + getByOperationOperationSpec + ); + } - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - assignToOperationOperationSpec - ); - } + /** + * Assign tag to the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + assignToOperationOperationSpec + ); + } - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - detachFromOperationOperationSpec - ); - } + /** + * Detach the tag from the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, tagId, options }, + detachFromOperationOperationSpec + ); + } - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec - ); - } + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + private _listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, options }, + listByApiOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getEntityStateByApiOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + getEntityStateByApiOperationSpec + ); + } - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getByApiOperationSpec - ); - } + /** + * Get tag associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + getByApiOperationSpec + ); + } - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - assignToApiOperationSpec - ); - } + /** + * Assign tag to the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + assignToApiOperationSpec + ); + } - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - detachFromApiOperationSpec - ); - } + /** + * Detach the tag from the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, tagId, options }, + detachFromApiOperationSpec + ); + } - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec - ); - } + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, options }, + listByProductOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getEntityStateByProductOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + getEntityStateByProductOperationSpec + ); + } - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getByProductOperationSpec - ); - } + /** + * Get tag associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + getByProductOperationSpec + ); + } - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - assignToProductOperationSpec - ); - } + /** + * Assign tag to the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + assignToProductOperationSpec + ); + } - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - detachFromProductOperationSpec - ); - } + /** + * Detach the tag from the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, tagId, options }, + detachFromProductOperationSpec + ); + } - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getEntityStateOperationSpec - ); - } + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityState( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, options }, + getEntityStateOperationSpec + ); + } - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, options }, + getOperationSpec + ); + } - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates a tag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific tag of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, tagId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - nextLink: string, - options?: TagListByOperationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, nextLink, options }, - listByOperationNextOperationSpec - ); - } + /** + * ListByOperationNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param nextLink The nextLink from the previous successful call to the ListByOperation method. + * @param options The options parameters. + */ + private _listByOperationNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + nextLink: string, + options?: TagListByOperationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, operationId, nextLink, options }, + listByOperationNextOperationSpec + ); + } - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: TagListByApiNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec - ); - } + /** + * ListByApiNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param nextLink The nextLink from the previous successful call to the ListByApi method. + * @param options The options parameters. + */ + private _listByApiNext( + resourceGroupName: string, + serviceName: string, + apiId: string, + nextLink: string, + options?: TagListByApiNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, apiId, nextLink, options }, + listByApiNextOperationSpec + ); + } - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: TagListByProductNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec - ); - } + /** + * ListByProductNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the ListByProduct method. + * @param options The options parameters. + */ + private _listByProductNext( + resourceGroupName: string, + serviceName: string, + productId: string, + nextLink: string, + options?: TagListByProductNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, productId, nextLink, options }, + listByProductNextOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TagListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByOperationHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByOperationHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getByOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByOperationHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByOperationHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract - }, - 201: { - bodyMapper: Mappers.TagContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract + }, + 201: { + bodyMapper: Mappers.TagContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromOperationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.operationId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getByApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagAssignToApiHeaders + }, + 201: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagAssignToApiHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromApiOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByProductHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateByProductHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const getByProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByProductHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetByProductHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const assignToProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract - }, - 201: { - bodyMapper: Mappers.TagContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract + }, + 201: { + bodyMapper: Mappers.TagContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const detachFromProductOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.scope - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.scope + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityStateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TagGetEntityStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.TagContract, + headersMapper: Mappers.TagUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.tagId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.tagId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer }; const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.apiId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.apiId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.productId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.productId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts index 1a0a0f0a8cb1..4f31eafe9cc3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts @@ -6,202 +6,202 @@ * 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 { TagResource } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TagResourceContract, - TagResourceListByServiceNextOptionalParams, - TagResourceListByServiceOptionalParams, - TagResourceListByServiceResponse, - TagResourceListByServiceNextResponse -} from "../models"; + TagResourceContract, + TagResourceListByServiceNextOptionalParams, + TagResourceListByServiceNextResponse, + TagResourceListByServiceOptionalParams, + TagResourceListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TagResource } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TagResource operations. */ export class TagResourceImpl implements TagResource { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TagResource class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TagResource class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TagResourceListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TagResourceListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagResourceListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TagResourceListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TagResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts index ab0c13bb24d9..6f250a41dcfa 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts @@ -6,542 +6,542 @@ * 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 { TenantAccess } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AccessInformationContract, - TenantAccessListByServiceNextOptionalParams, - TenantAccessListByServiceOptionalParams, - TenantAccessListByServiceResponse, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse, - TenantAccessListByServiceNextResponse -} from "../models"; + AccessIdName, + AccessInformationContract, + AccessInformationCreateParameters, + AccessInformationUpdateParameters, + TenantAccessCreateOptionalParams, + TenantAccessCreateResponse, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetEntityTagResponse, + TenantAccessGetOptionalParams, + TenantAccessGetResponse, + TenantAccessListByServiceNextOptionalParams, + TenantAccessListByServiceNextResponse, + TenantAccessListByServiceOptionalParams, + TenantAccessListByServiceResponse, + TenantAccessListSecretsOptionalParams, + TenantAccessListSecretsResponse, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantAccess } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TenantAccess operations. */ export class TenantAccessImpl implements TenantAccess { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantAccess class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantAccess class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TenantAccessListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TenantAccessListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getEntityTagOperationSpec - ); - } + /** + * Tenant access metadata + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + getEntityTagOperationSpec + ); + } - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getOperationSpec - ); - } + /** + * Get tenant access information details without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + getOperationSpec + ); + } - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options - }, - createOperationSpec - ); - } + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options + }, + createOperationSpec + ); + } - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options - }, - updateOperationSpec - ); - } + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options + }, + updateOperationSpec + ); + } - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerate primary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerate secondary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regenerateSecondaryKeyOperationSpec + ); + } - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - listSecretsOperationSpec - ); - } + /** + * Get tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + listSecretsOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantAccessListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TenantAccessListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.filter, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TenantAccessGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.TenantAccessGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessCreateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessCreateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters69, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationContract, + headersMapper: Mappers.TenantAccessUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters70, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationSecretsContract, - headersMapper: Mappers.TenantAccessListSecretsHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationSecretsContract, + headersMapper: Mappers.TenantAccessListSecretsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessInformationCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts index 9d7f1db29713..0315796b22df 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts @@ -6,109 +6,109 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { TenantAccessGit } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams -} from "../models"; + AccessIdName, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, + TenantAccessGitRegenerateSecondaryKeyOptionalParams +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantAccessGit } from "../operationsInterfaces/index.js"; /** Class containing TenantAccessGit operations. */ export class TenantAccessGitImpl implements TenantAccessGit { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantAccessGit class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantAccessGit class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec - ); - } + /** + * Regenerate primary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regeneratePrimaryKeyOperationSpec + ); + } - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec - ); - } + /** + * Regenerate secondary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, accessName, options }, + regenerateSecondaryKeyOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.accessName - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.accessName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts index 15867ab82145..20ae4cc5c196 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts @@ -6,515 +6,515 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { TenantConfiguration } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; import { - SimplePollerLike, - OperationState, - createHttpPoller + OperationState, + SimplePollerLike, + createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { createLroSpec } from "../lroImpl.js"; import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse -} from "../models"; + ConfigurationIdName, + DeployConfigurationParameters, + SaveConfigurationParameter, + TenantConfigurationDeployOptionalParams, + TenantConfigurationDeployResponse, + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationGetSyncStateResponse, + TenantConfigurationSaveOptionalParams, + TenantConfigurationSaveResponse, + TenantConfigurationValidateOptionalParams, + TenantConfigurationValidateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantConfiguration } from "../operationsInterfaces/index.js"; /** Class containing TenantConfiguration operations. */ export class TenantConfigurationImpl implements TenantConfiguration { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantConfiguration class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - > { - 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() - } - }; - }; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + async beginDeploy( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationDeployResponse + > + > { + 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, - serviceName, - configurationName, - parameters, - options - }, - spec: deployOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationDeployResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: deployOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationDeployResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise { - const poller = await this.beginDeploy( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + async beginDeployAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise { + const poller = await this.beginDeploy( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - > { - 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() - } - }; - }; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + async beginSave( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationSaveResponse + > + > { + 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, - serviceName, - configurationName, - parameters, - options - }, - spec: saveOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationSaveResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: saveOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationSaveResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise { - const poller = await this.beginSave( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + async beginSaveAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise { + const poller = await this.beginSave( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - > { - 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() - } - }; - }; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + async beginValidate( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationValidateResponse + > + > { + 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, - serviceName, - configurationName, - parameters, - options - }, - spec: validateOperationSpec - }); - const poller = await createHttpPoller< - TenantConfigurationValidateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationName, + parameters, + options + }, + spec: validateOperationSpec + }); + const poller = await createHttpPoller< + TenantConfigurationValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise { - const poller = await this.beginValidate( - resourceGroupName, - serviceName, - configurationName, - parameters, - options - ); - return poller.pollUntilDone(); - } + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + async beginValidateAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise { + const poller = await this.beginValidate( + resourceGroupName, + serviceName, + configurationName, + parameters, + options + ); + return poller.pollUntilDone(); + } - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, configurationName, options }, - getSyncStateOperationSpec - ); - } + /** + * Gets the status of the most recent synchronization between the configuration database and the Git + * repository. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param options The options parameters. + */ + getSyncState( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, configurationName, options }, + getSyncStateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const deployOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters71, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const saveOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters72, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const validateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract - }, - 201: { - bodyMapper: Mappers.OperationResultContract - }, - 202: { - bodyMapper: Mappers.OperationResultContract - }, - 204: { - bodyMapper: Mappers.OperationResultContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationResultContract + }, + 201: { + bodyMapper: Mappers.OperationResultContract + }, + 202: { + bodyMapper: Mappers.OperationResultContract + }, + 204: { + bodyMapper: Mappers.OperationResultContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters71, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const getSyncStateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantConfigurationSyncStateContract + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantConfigurationSyncStateContract + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.configurationName - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.configurationName + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts index b46350a3c9ab..0b281e458666 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts @@ -6,243 +6,243 @@ * 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 { TenantSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - TenantSettingsContract, - TenantSettingsListByServiceNextOptionalParams, - TenantSettingsListByServiceOptionalParams, - TenantSettingsListByServiceResponse, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse, - TenantSettingsListByServiceNextResponse -} from "../models"; + SettingsTypeName, + TenantSettingsContract, + TenantSettingsGetOptionalParams, + TenantSettingsGetResponse, + TenantSettingsListByServiceNextOptionalParams, + TenantSettingsListByServiceNextResponse, + TenantSettingsListByServiceOptionalParams, + TenantSettingsListByServiceResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { TenantSettings } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing TenantSettings operations. */ export class TenantSettingsImpl implements TenantSettings { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class TenantSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class TenantSettings class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TenantSettingsListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TenantSettingsListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, settingsType, options }, - getOperationSpec - ); - } + /** + * Get tenant settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param settingsType The identifier of the settings. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, settingsType, options }, + getOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantSettingsListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: TenantSettingsListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.filter, Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsContract, - headersMapper: Mappers.TenantSettingsGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsContract, + headersMapper: Mappers.TenantSettingsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.settingsType - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.settingsType + ], + headerParameters: [Parameters.accept], + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TenantSettingsCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts index 8aa6945fedab..745cf33bc6c5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts @@ -6,551 +6,551 @@ * 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 { User } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserContract, - UserListByServiceNextOptionalParams, - UserListByServiceOptionalParams, - UserListByServiceResponse, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse, - UserListByServiceNextResponse -} from "../models"; + UserContract, + UserCreateOrUpdateOptionalParams, + UserCreateOrUpdateResponse, + UserCreateParameters, + UserDeleteOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserGenerateSsoUrlResponse, + UserGetEntityTagOptionalParams, + UserGetEntityTagResponse, + UserGetOptionalParams, + UserGetResponse, + UserGetSharedAccessTokenOptionalParams, + UserGetSharedAccessTokenResponse, + UserListByServiceNextOptionalParams, + UserListByServiceNextResponse, + UserListByServiceOptionalParams, + UserListByServiceResponse, + UserTokenParameters, + UserUpdateOptionalParams, + UserUpdateParameters, + UserUpdateResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { User } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing User operations. */ export class UserImpl implements User { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class User class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class User class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - 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.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + public listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServicePagingAll( + resourceGroupName, + serviceName, + options ); - } - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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.listByServicePagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listByServicePagingPage( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServiceNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options - )) { - yield* page; + private async *listByServicePagingAll( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServicePagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } } - } - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec - ); - } + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + private _listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listByServiceOperationSpec + ); + } - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getEntityTagOperationSpec - ); - } + /** + * Gets the entity state (Etag) version of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + getEntityTagOperationSpec + ); + } - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getOperationSpec - ); - } + /** + * Gets the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + getOperationSpec + ); + } - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - createOrUpdateOperationSpec - ); - } + /** + * Creates or Updates a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, parameters, options }, + createOrUpdateOperationSpec + ); + } - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, ifMatch, parameters, options }, - updateOperationSpec - ); - } + /** + * Updates the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, ifMatch, parameters, options }, + updateOperationSpec + ); + } - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, ifMatch, options }, - deleteOperationSpec - ); - } + /** + * Deletes specific user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, ifMatch, options }, + deleteOperationSpec + ); + } - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - generateSsoUrlOperationSpec - ); - } + /** + * Retrieves a redirection URL containing an authentication token for signing a given user into the + * developer portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + generateSsoUrl( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + generateSsoUrlOperationSpec + ); + } - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - getSharedAccessTokenOperationSpec - ); - } + /** + * Gets the Shared Access Authorization Token for the User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create Authorization Token parameters. + * @param options The options parameters. + */ + getSharedAccessToken( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, parameters, options }, + getSharedAccessTokenOperationSpec + ); + } - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: UserListByServiceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec - ); - } + /** + * ListByServiceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param nextLink The nextLink from the previous successful call to the ListByService method. + * @param options The options parameters. + */ + private _listByServiceNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: UserListByServiceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listByServiceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion, - Parameters.expandGroups - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion, + Parameters.expandGroups + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer }; const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.UserGetEntityTagHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.UserGetEntityTagHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders - }, - 201: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion, Parameters.notify], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters73, + queryParameters: [Parameters.apiVersion, Parameters.notify], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch + ], + mediaType: "json", + serializer }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserUpdateHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.UserContract, + headersMapper: Mappers.UserUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch1 - ], - mediaType: "json", - serializer + requestBody: Parameters.parameters74, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [ + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch1 + ], + mediaType: "json", + serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.deleteSubscriptions, - Parameters.notify, - Parameters.appType - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.deleteSubscriptions, + Parameters.notify, + Parameters.appType + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept, Parameters.ifMatch1], + serializer }; const generateSsoUrlOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GenerateSsoUrlResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GenerateSsoUrlResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getSharedAccessTokenOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.UserTokenResult + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UserTokenResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer + requestBody: Parameters.parameters75, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts index 0a9175427c03..fe09ce088e65 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts @@ -6,65 +6,65 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { UserConfirmationPassword } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; -import { UserConfirmationPasswordSendOptionalParams } from "../models"; +import { ApiManagementClient } from "../apiManagementClient.js"; +import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserConfirmationPassword } from "../operationsInterfaces/index.js"; /** Class containing UserConfirmationPassword operations. */ export class UserConfirmationPasswordImpl implements UserConfirmationPassword { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserConfirmationPassword class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserConfirmationPassword class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - sendOperationSpec - ); - } + /** + * Sends confirmation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + send( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + sendOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const sendOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.appType], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.appType], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts index 1627954cbe7a..a234b369a319 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts @@ -6,217 +6,217 @@ * 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 { UserGroup } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - GroupContract, - UserGroupListNextOptionalParams, - UserGroupListOptionalParams, - UserGroupListResponse, - UserGroupListNextResponse -} from "../models"; + GroupContract, + UserGroupListNextOptionalParams, + UserGroupListNextResponse, + UserGroupListOptionalParams, + UserGroupListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserGroup } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserGroup operations. */ export class UserGroupImpl implements UserGroup { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserGroup class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - 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( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserGroupListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserGroupListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserGroupListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserGroupListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GroupCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts index 4ff92b553f94..671e1b8e82cb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts @@ -6,212 +6,212 @@ * 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 { UserIdentities } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - UserIdentityContract, - UserIdentitiesListNextOptionalParams, - UserIdentitiesListOptionalParams, - UserIdentitiesListResponse, - UserIdentitiesListNextResponse -} from "../models"; + UserIdentitiesListNextOptionalParams, + UserIdentitiesListNextResponse, + UserIdentitiesListOptionalParams, + UserIdentitiesListResponse, + UserIdentityContract +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserIdentities } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserIdentities operations. */ export class UserIdentitiesImpl implements UserIdentities { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserIdentities class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserIdentities class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - 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( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserIdentitiesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserIdentitiesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserIdentitiesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserIdentitiesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserIdentityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UserIdentityCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts index 8e4838abc76a..fd9b73288719 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts @@ -6,266 +6,266 @@ * 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 { UserSubscription } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ApiManagementClient } from "../apiManagementClient"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { ApiManagementClient } from "../apiManagementClient.js"; import { - SubscriptionContract, - UserSubscriptionListNextOptionalParams, - UserSubscriptionListOptionalParams, - UserSubscriptionListResponse, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse, - UserSubscriptionListNextResponse -} from "../models"; + SubscriptionContract, + UserSubscriptionGetOptionalParams, + UserSubscriptionGetResponse, + UserSubscriptionListNextOptionalParams, + UserSubscriptionListNextResponse, + UserSubscriptionListOptionalParams, + UserSubscriptionListResponse +} from "../models/index.js"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UserSubscription } from "../operationsInterfaces/index.js"; +import { setContinuationToken } from "../pagingHelper.js"; /// /** Class containing UserSubscription operations. */ export class UserSubscriptionImpl implements UserSubscription { - private readonly client: ApiManagementClient; + private readonly client: ApiManagementClient; - /** - * Initialize a new instance of the class UserSubscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } + /** + * Initialize a new instance of the class UserSubscription class. + * @param client Reference to the service client + */ + constructor(client: ApiManagementClient) { + this.client = client; + } - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - 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( - resourceGroupName, - serviceName, - userId, - options, - settings + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + serviceName, + userId, + options ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UserSubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; + 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( + resourceGroupName, + serviceName, + userId, + options, + settings + ); + } + }; } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UserSubscriptionListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serviceName, + userId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + userId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - } - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options - )) { - yield* page; + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + userId, + options + )) { + yield* page; + } } - } - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec - ); - } + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, options }, + listOperationSpec + ); + } - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, sid, options }, - getOperationSpec - ); - } + /** + * Gets the specified Subscription entity associated with a particular user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, sid, options }, + getOperationSpec + ); + } - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserSubscriptionListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec - ); - } + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + userId: string, + nextLink: string, + options?: UserSubscriptionListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, userId, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.skip, + Parameters.apiVersion + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.UserSubscriptionGetHeaders + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionContract, + headersMapper: Mappers.UserSubscriptionGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.userId, - Parameters.sid - ], - headerParameters: [Parameters.accept], - serializer + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.userId, + Parameters.sid + ], + headerParameters: [Parameters.accept], + serializer }; const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.userId - ], - headerParameters: [Parameters.accept], - serializer + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.userId + ], + headerParameters: [Parameters.accept], + serializer }; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts index 0ff932cdd76b..f525873deffd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts @@ -6,150 +6,150 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - ApiContract, - ApiListByServiceOptionalParams, - TagResourceContract, - ApiListByTagsOptionalParams, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams -} from "../models"; + ApiContract, + ApiCreateOrUpdateOptionalParams, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateResponse, + ApiDeleteOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetEntityTagResponse, + ApiGetOptionalParams, + ApiGetResponse, + ApiListByServiceOptionalParams, + ApiListByTagsOptionalParams, + ApiUpdateContract, + ApiUpdateOptionalParams, + ApiUpdateResponse, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a Api. */ export interface Api { - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams - ): Promise; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams - ): Promise; + /** + * Lists all APIs of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of apis associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams + ): Promise; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiCreateOrUpdateResponse + > + >; + /** + * Creates new or updates existing specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Update Contract parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts index d369a59d6f66..66882cfcf6cb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts @@ -8,123 +8,123 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DiagnosticContract, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams -} from "../models"; + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateResponse, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetEntityTagResponse, + ApiDiagnosticGetOptionalParams, + ApiDiagnosticGetResponse, + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticUpdateResponse, + DiagnosticContract +} from "../models/index.js"; /// /** Interface representing a ApiDiagnostic. */ export interface ApiDiagnostic { - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams - ): Promise; - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams - ): Promise; + /** + * Lists all diagnostics of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams + ): Promise; + /** + * Creates a new Diagnostic for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Diagnostic for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Diagnostic from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts index 1efcf25c77c1..5427257f8bed 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts @@ -7,32 +7,32 @@ */ import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse -} from "../models"; + ApiExportGetOptionalParams, + ApiExportGetResponse, + ExportApi, + ExportFormat +} from "../models/index.js"; /** Interface representing a ApiExport. */ export interface ApiExport { - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams - ): Promise; + /** + * Gets the details of the API specified by its identifier in the format specified to the Storage Blob + * with SAS Key valid for 5 minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 + * minutes. + * @param exportParam Query parameter required to export the API details. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts index ca2f0189336a..0b10da89752b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts @@ -8,119 +8,119 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueContract, - ApiIssueListByServiceOptionalParams, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams -} from "../models"; + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueCreateOrUpdateResponse, + ApiIssueDeleteOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetEntityTagResponse, + ApiIssueGetOptionalParams, + ApiIssueGetResponse, + ApiIssueListByServiceOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueUpdateResponse, + IssueContract, + IssueUpdateContract +} from "../models/index.js"; /// /** Interface representing a ApiIssue. */ export interface ApiIssue { - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams - ): Promise; - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams - ): Promise; + /** + * Lists all issues associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Issue for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams + ): Promise; + /** + * Creates a new Issue for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing issue for an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Issue from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts index b6e147b842e3..39d173d3fdd8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams -} from "../models"; + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentCreateOrUpdateResponse, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetEntityTagResponse, + ApiIssueAttachmentGetOptionalParams, + ApiIssueAttachmentGetResponse, + ApiIssueAttachmentListByServiceOptionalParams, + IssueAttachmentContract +} from "../models/index.js"; /// /** Interface representing a ApiIssueAttachment. */ export interface ApiIssueAttachment { - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams - ): Promise; - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams - ): Promise; + /** + * Lists all attachments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the issue Attachment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams + ): Promise; + /** + * Creates a new Attachment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts index 4d86b68407ce..4bfd030eef3a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueCommentContract, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams -} from "../models"; + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentCreateOrUpdateResponse, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetEntityTagResponse, + ApiIssueCommentGetOptionalParams, + ApiIssueCommentGetResponse, + ApiIssueCommentListByServiceOptionalParams, + IssueCommentContract +} from "../models/index.js"; /// /** Interface representing a ApiIssueComment. */ export interface ApiIssueComment { - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams - ): Promise; - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams - ): Promise; + /** + * Lists all comments for the Issue associated with the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the issue Comment for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams + ): Promise; + /** + * Creates a new Comment for the Issue in an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified comment from an Issue. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts index e13d81ae1a56..304a03bc571a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts @@ -8,18 +8,18 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - Operation, - ApiManagementOperationsListOptionalParams -} from "../models"; + ApiManagementOperationsListOptionalParams, + Operation +} from "../models/index.js"; /// /** Interface representing a ApiManagementOperations. */ export interface ApiManagementOperations { - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - list( - options?: ApiManagementOperationsListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * @param options The options parameters. + */ + list( + options?: ApiManagementOperationsListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts index 947d8acdd1d3..86f90fec68c0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts @@ -6,309 +6,309 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse -} from "../models"; + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceBackupResponse, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceCheckNameAvailabilityResponse, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateResponse, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceGetDomainOwnershipIdentifierResponse, + ApiManagementServiceGetOptionalParams, + ApiManagementServiceGetResponse, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceGetSsoTokenResponse, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceMigrateToStv2Response, + ApiManagementServiceResource, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceRestoreResponse, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiManagementService. */ export interface ApiManagementService { - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementServiceListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - >; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams - ): Promise; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - >; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams - ): Promise; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - >; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - >; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams - ): Promise; - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams - ): Promise; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams - ): Promise; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - >; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams - ): Promise; - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams - ): Promise; - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams - ): Promise; - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - ): Promise; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - >, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - >; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - ): Promise; + /** + * List all API Management services within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all API Management services within an Azure subscription. + * @param options The options parameters. + */ + list( + options?: ApiManagementServiceListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + beginRestore( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceRestoreResponse + > + >; + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup + * operation on the current service. This is a long running operation and could take several minutes to + * complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the Restore API Management service from backup operation. + * @param options The options parameters. + */ + beginRestoreAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams + ): Promise; + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + beginBackup( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceBackupResponse + > + >; + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long + * running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the ApiManagementService_Backup operation. + * @param options The options parameters. + */ + beginBackupAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams + ): Promise; + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceCreateOrUpdateResponse + > + >; + /** + * Creates or updates an API Management service. This is long running operation and could take several + * minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceUpdateResponse + > + >; + /** + * Updates an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams + ): Promise; + /** + * Gets an API Management service resource description. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams + ): Promise; + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an existing API Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams + ): Promise; + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginMigrateToStv2( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiManagementServiceMigrateToStv2Response + > + >; + /** + * Upgrades an API Management service to the Stv2 platform. For details refer to + * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and + * could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginMigrateToStv2AndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams + ): Promise; + /** + * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getSsoToken( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams + ): Promise; + /** + * Checks availability and correctness of a name for an API Management service. + * @param parameters Parameters supplied to the CheckNameAvailability operation. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams + ): Promise; + /** + * Get the custom domain ownership identifier for an API Management service. + * @param options The options parameters. + */ + getDomainOwnershipIdentifier( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams + ): Promise; + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginApplyNetworkConfigurationUpdates( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + >, + ApiManagementServiceApplyNetworkConfigurationUpdatesResponse + > + >; + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS + * changes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + beginApplyNetworkConfigurationUpdatesAndWait( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts index 49efcda76ba3..acd9797039cf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts @@ -8,22 +8,22 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams -} from "../models"; + ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ResourceSkuResult +} from "../models/index.js"; /// /** Interface representing a ApiManagementServiceSkus. */ export interface ApiManagementServiceSkus { - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets all available SKU for a given API Management service + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listAvailableServiceSkus( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts index c5459f44cbf1..c27c8366d7b8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts @@ -8,18 +8,18 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiManagementSku, - ApiManagementSkusListOptionalParams -} from "../models"; + ApiManagementSku, + ApiManagementSkusListOptionalParams +} from "../models/index.js"; /// /** Interface representing a ApiManagementSkus. */ export interface ApiManagementSkus { - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementSkusListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * @param options The options parameters. + */ + list( + options?: ApiManagementSkusListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts index bfe69dd00983..743eff9e716d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts @@ -8,130 +8,130 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - OperationContract, - ApiOperationListByApiOptionalParams, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams -} from "../models"; + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationCreateOrUpdateResponse, + ApiOperationDeleteOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetEntityTagResponse, + ApiOperationGetOptionalParams, + ApiOperationGetResponse, + ApiOperationListByApiOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationUpdateResponse, + OperationContract, + OperationUpdateContract +} from "../models/index.js"; /// /** Interface representing a ApiOperation. */ export interface ApiOperation { - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams - ): Promise; - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams - ): Promise; - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the operations for the specified API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the API operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the API Operation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams + ): Promise; + /** + * Creates a new operation in the API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the operation in the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Operation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams + ): Promise; + /** + * Deletes the specified operation in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts index 224a85a7e194..39be08d7effd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts @@ -7,117 +7,117 @@ */ import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams -} from "../models"; + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyCreateOrUpdateResponse, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetEntityTagResponse, + ApiOperationPolicyGetOptionalParams, + ApiOperationPolicyGetResponse, + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyListByOperationResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /** Interface representing a ApiOperationPolicy. */ export interface ApiOperationPolicy { - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams - ): Promise; + /** + * Get the list of policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the API operation policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the API Operation level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Api Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts index 3d54b954c30e..a99e543c3099 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts @@ -7,102 +7,102 @@ */ import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams -} from "../models"; + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyCreateOrUpdateResponse, + ApiPolicyDeleteOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetEntityTagResponse, + ApiPolicyGetOptionalParams, + ApiPolicyGetResponse, + ApiPolicyListByApiOptionalParams, + ApiPolicyListByApiResponse, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /** Interface representing a ApiPolicy. */ export interface ApiPolicy { - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams - ): Promise; + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the API policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts index d83bdb058e0a..d2dc54e5c812 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ProductContract, ApiProductListByApisOptionalParams } from "../models"; +import { ApiProductListByApisOptionalParams, ProductContract } from "../models/index.js"; /// /** Interface representing a ApiProduct. */ export interface ApiProduct { - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all Products, which the API is part of. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByApis( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts index 15d74409908a..e02d60a51477 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts @@ -8,125 +8,125 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiReleaseContract, - ApiReleaseListByServiceOptionalParams, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams -} from "../models"; + ApiReleaseContract, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseCreateOrUpdateResponse, + ApiReleaseDeleteOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetEntityTagResponse, + ApiReleaseGetOptionalParams, + ApiReleaseGetResponse, + ApiReleaseListByServiceOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiRelease. */ export interface ApiRelease { - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams - ): Promise; - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams - ): Promise; - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams - ): Promise; - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams - ): Promise; + /** + * Lists all releases of an API. An API release is created when making an API Revision current. + * Releases are also used to rollback to previous revisions. Results will be paged and can be + * constrained by the $top and $skip parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Returns the etag of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams + ): Promise; + /** + * Returns the details of an API release. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams + ): Promise; + /** + * Creates a new Release for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the release of the API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters API Release Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams + ): Promise; + /** + * Deletes the specified release in the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param releaseId Release identifier within an API. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts index 8264f54d3f06..8da885063b8a 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiRevisionContract, - ApiRevisionListByServiceOptionalParams -} from "../models"; + ApiRevisionContract, + ApiRevisionListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ApiRevision. */ export interface ApiRevision { - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all revisions of an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts index 2a2b5c2c807c..7056686f6734 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts @@ -6,127 +6,127 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - SchemaContract, - ApiSchemaListByApiOptionalParams, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams -} from "../models"; + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaCreateOrUpdateResponse, + ApiSchemaDeleteOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetEntityTagResponse, + ApiSchemaGetOptionalParams, + ApiSchemaGetResponse, + ApiSchemaListByApiOptionalParams, + SchemaContract +} from "../models/index.js"; /// /** Interface representing a ApiSchema. */ export interface ApiSchema { - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams - ): Promise; - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams - ): Promise; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - >; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams - ): Promise; + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams + ): Promise; + /** + * Get the schema configuration at the API level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams + ): Promise; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ApiSchemaCreateOrUpdateResponse + > + >; + /** + * Creates or updates schema configuration for the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters The schema contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the schema configuration at the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts index cd4303cd42c1..85e5b5ec3544 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagDescriptionContract, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams -} from "../models"; + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionCreateOrUpdateResponse, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetEntityTagResponse, + ApiTagDescriptionGetOptionalParams, + ApiTagDescriptionGetResponse, + ApiTagDescriptionListByServiceOptionalParams, + TagDescriptionContract, + TagDescriptionCreateParameters +} from "../models/index.js"; /// /** Interface representing a ApiTagDescription. */ export interface ApiTagDescription { - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams - ): Promise; - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams - ): Promise; - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams - ): Promise; - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams - ): Promise; + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on + * API level but tag may be assigned to the Operations + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams + ): Promise; + /** + * Get Tag description in scope of API + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams + ): Promise; + /** + * Create/Update tag description in scope of the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete tag description for the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag + * association. Based on API and Tag names. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts index 4a5912de1735..edac616ef3a2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiVersionSetContract, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams -} from "../models"; + ApiVersionSetContract, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetCreateOrUpdateResponse, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetEntityTagResponse, + ApiVersionSetGetOptionalParams, + ApiVersionSetGetResponse, + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateResponse +} from "../models/index.js"; /// /** Interface representing a ApiVersionSet. */ export interface ApiVersionSet { - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams - ): Promise; - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams - ): Promise; - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams - ): Promise; + /** + * Lists a collection of API Version Sets in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Api Version Set specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams + ): Promise; + /** + * Creates or Updates a Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Api VersionSet specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams + ): Promise; + /** + * Deletes specific Api Version Set. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts index 5d6bcdf9565c..005667455680 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts @@ -7,94 +7,94 @@ */ import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams -} from "../models"; + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiCreateOrUpdateResponse, + ApiWikiDeleteOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetEntityTagResponse, + ApiWikiGetOptionalParams, + ApiWikiGetResponse, + ApiWikiUpdateOptionalParams, + ApiWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; /** Interface representing a ApiWiki. */ export interface ApiWiki { - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams - ): Promise; - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams + ): Promise; + /** + * Creates a new Wiki for an API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Wiki for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Wiki from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts index b86f924bee02..96e551db357b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ApiWikisListOptionalParams } from "../models"; +import { ApiWikisListOptionalParams, WikiContract } from "../models/index.js"; /// /** Interface representing a ApiWikis. */ export interface ApiWikis { - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the wikis for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts index 015f10f04d61..c468c1d51e30 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts @@ -8,99 +8,99 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse -} from "../models"; + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationConfirmConsentCodeResponse, + AuthorizationContract, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationCreateOrUpdateResponse, + AuthorizationDeleteOptionalParams, + AuthorizationGetOptionalParams, + AuthorizationGetResponse, + AuthorizationListByAuthorizationProviderOptionalParams +} from "../models/index.js"; /// /** Interface representing a Authorization. */ export interface Authorization { - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams - ): Promise; - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams - ): Promise; - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams - ): Promise; + /** + * Lists a collection of authorization providers defined within a authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + listByAuthorizationProvider( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams + ): Promise; + /** + * Creates or updates authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific Authorization from the Authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams + ): Promise; + /** + * Confirm valid consent code to suppress Authorizations anti-phishing page. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + confirmConsentCode( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts index 9bbf78ae39d7..96210457ec57 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts @@ -8,87 +8,87 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams -} from "../models"; + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateResponse, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, + AuthorizationAccessPolicyGetResponse, + AuthorizationAccessPolicyListByAuthorizationOptionalParams +} from "../models/index.js"; /// /** Interface representing a AuthorizationAccessPolicy. */ export interface AuthorizationAccessPolicy { - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams - ): Promise; + /** + * Lists a collection of authorization access policy defined within a authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param options The options parameters. + */ + listByAuthorization( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization access policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates Authorization Access Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific access policy from the Authorization. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param authorizationAccessPolicyId Identifier of the authorization access policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts index bcfc0be03fe5..23ad1d46b4ea 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts @@ -7,28 +7,28 @@ */ import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse -} from "../models"; + AuthorizationLoginLinksPostOptionalParams, + AuthorizationLoginLinksPostResponse, + AuthorizationLoginRequestContract +} from "../models/index.js"; /** Interface representing a AuthorizationLoginLinks. */ export interface AuthorizationLoginLinks { - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams - ): Promise; + /** + * Gets authorization login links. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param authorizationId Identifier of the authorization. + * @param parameters Create parameters. + * @param options The options parameters. + */ + post( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts index 1b2c64bf2296..6d7e4a2d7bae 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts @@ -8,71 +8,71 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams -} from "../models"; + AuthorizationProviderContract, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderCreateOrUpdateResponse, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderGetOptionalParams, + AuthorizationProviderGetResponse, + AuthorizationProviderListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a AuthorizationProvider. */ export interface AuthorizationProvider { - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams - ): Promise; - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams - ): Promise; + /** + * Lists a collection of authorization providers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the authorization provider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams + ): Promise; + /** + * Creates or updates authorization provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific authorization provider from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authorizationProviderId Identifier of the authorization provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts index d70ac4bcaccc..bac3852d227d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts @@ -8,122 +8,122 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AuthorizationServerContract, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse -} from "../models"; + AuthorizationServerContract, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerCreateOrUpdateResponse, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetEntityTagResponse, + AuthorizationServerGetOptionalParams, + AuthorizationServerGetResponse, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListSecretsResponse, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerUpdateResponse +} from "../models/index.js"; /// /** Interface representing a AuthorizationServer. */ export interface AuthorizationServer { - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams - ): Promise; - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams - ): Promise; - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams - ): Promise; + /** + * Lists a collection of authorization servers defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams + ): Promise; + /** + * Creates new authorization server or updates an existing authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the authorization server specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters OAuth2 Server settings Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams + ): Promise; + /** + * Deletes specific authorization server instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the authorization server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param authsid Identifier of the authorization server. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts index 40e8e927c666..e7fd8604ff5c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts @@ -8,128 +8,128 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - BackendContract, - BackendListByServiceOptionalParams, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams -} from "../models"; + BackendContract, + BackendCreateOrUpdateOptionalParams, + BackendCreateOrUpdateResponse, + BackendDeleteOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetEntityTagResponse, + BackendGetOptionalParams, + BackendGetResponse, + BackendListByServiceOptionalParams, + BackendReconnectOptionalParams, + BackendUpdateOptionalParams, + BackendUpdateParameters, + BackendUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Backend. */ export interface Backend { - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams - ): Promise; - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams - ): Promise; - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams - ): Promise; - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams - ): Promise; + /** + * Lists a collection of backends in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the backend specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams + ): Promise; + /** + * Creates or Updates a backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams + ): Promise; + /** + * Deletes the specified backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams + ): Promise; + /** + * Notifies the API Management gateway to create a new connection to the backend after the specified + * timeout. If no timeout was specified, timeout of 2 minutes is used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param backendId Identifier of the Backend entity. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + reconnect( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts index 8572de9ad24a..83e149d2d53e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - CacheContract, - CacheListByServiceOptionalParams, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams -} from "../models"; + CacheContract, + CacheCreateOrUpdateOptionalParams, + CacheCreateOrUpdateResponse, + CacheDeleteOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetEntityTagResponse, + CacheGetOptionalParams, + CacheGetResponse, + CacheListByServiceOptionalParams, + CacheUpdateOptionalParams, + CacheUpdateParameters, + CacheUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Cache. */ export interface Cache { - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams - ): Promise; - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams - ): Promise; - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams - ): Promise; + /** + * Lists a collection of all external Caches in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams + ): Promise; + /** + * Creates or updates an External Cache to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the cache specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams + ): Promise; + /** + * Deletes specific Cache. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid + * Azure region identifier). + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts index 1cf2f8298d79..5b7b7e05fe2c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - CertificateContract, - CertificateListByServiceOptionalParams, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse -} from "../models"; + CertificateContract, + CertificateCreateOrUpdateOptionalParams, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateResponse, + CertificateDeleteOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetEntityTagResponse, + CertificateGetOptionalParams, + CertificateGetResponse, + CertificateListByServiceOptionalParams, + CertificateRefreshSecretOptionalParams, + CertificateRefreshSecretResponse +} from "../models/index.js"; /// /** Interface representing a Certificate. */ export interface Certificate { - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams - ): Promise; - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams - ): Promise; - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams - ): Promise; + /** + * Lists a collection of all certificates in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the certificate specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams + ): Promise; + /** + * Creates or updates the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Create or Update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams + ): Promise; + /** + * From KeyVault, Refresh the certificate being used for authentication with the backend. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + refreshSecret( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts index d6db18227d54..43bb560d7773 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts @@ -8,97 +8,97 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ContentItemContract, - ContentItemListByServiceOptionalParams, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams -} from "../models"; + ContentItemContract, + ContentItemCreateOrUpdateOptionalParams, + ContentItemCreateOrUpdateResponse, + ContentItemDeleteOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetEntityTagResponse, + ContentItemGetOptionalParams, + ContentItemGetResponse, + ContentItemListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ContentItem. */ export interface ContentItem { - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams - ): Promise; - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams - ): Promise; - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams - ): Promise; + /** + * Lists developer portal's content items specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Returns the entity state (ETag) version of the developer portal's content item specified by its + * identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams + ): Promise; + /** + * Returns the developer portal's content item specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams + ): Promise; + /** + * Creates a new developer portal's content item specified by the provided content type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the specified developer portal's content item. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param contentItemId Content item identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts index 68c247315096..17eac2fee9df 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts @@ -8,77 +8,77 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ContentTypeContract, - ContentTypeListByServiceOptionalParams, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams -} from "../models"; + ContentTypeContract, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeCreateOrUpdateResponse, + ContentTypeDeleteOptionalParams, + ContentTypeGetOptionalParams, + ContentTypeGetResponse, + ContentTypeListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a ContentType. */ export interface ContentType { - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams - ): Promise; - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams - ): Promise; + /** + * Lists the developer portal's content types. Content types describe content items' properties, + * validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams + ): Promise; + /** + * Creates or updates the developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Custom content types' identifiers need to start with + * the `c-` prefix. Built-in content types can't be modified. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the specified developer portal's content type. Content types describe content items' + * properties, validation rules, and constraints. Built-in content types (with identifiers starting + * with the `c-` prefix) can't be removed. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param contentTypeId Content type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts index 650d46f719ba..9af9216a0754 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts @@ -7,80 +7,80 @@ */ import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse -} from "../models"; + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsCreateOrUpdateResponse, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetEntityTagResponse, + DelegationSettingsGetOptionalParams, + DelegationSettingsGetResponse, + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsListSecretsResponse, + DelegationSettingsUpdateOptionalParams, + PortalDelegationSettings +} from "../models/index.js"; /** Interface representing a DelegationSettings. */ export interface DelegationSettings { - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams - ): Promise; - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams - ): Promise; - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Delegation Settings for the Portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams + ): Promise; + /** + * Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Delegation settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Delegation settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets the secret validation key of the DelegationSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts index fda32ab5743c..0954cc06811b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts @@ -6,57 +6,57 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - DeletedServiceContract, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams -} from "../models"; + DeletedServiceContract, + DeletedServicesGetByNameOptionalParams, + DeletedServicesGetByNameResponse, + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams +} from "../models/index.js"; /// /** Interface representing a DeletedServices. */ export interface DeletedServices { - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams - ): Promise; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise, void>>; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams - ): Promise; + /** + * Lists all soft-deleted services available for undelete for the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: DeletedServicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get soft-deleted Api Management Service by name. + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + getByName( + serviceName: string, + location: string, + options?: DeletedServicesGetByNameOptionalParams + ): Promise; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + beginPurge( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise, void>>; + /** + * Purges Api Management Service (deletes it with no option to undelete). + * @param serviceName The name of the API Management service. + * @param location The location of the deleted API Management service. + * @param options The options parameters. + */ + beginPurgeAndWait( + serviceName: string, + location: string, + options?: DeletedServicesPurgeOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts index a33338aa2633..772dee6595f8 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts @@ -8,111 +8,111 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DiagnosticContract, - DiagnosticListByServiceOptionalParams, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams -} from "../models"; + DiagnosticContract, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticCreateOrUpdateResponse, + DiagnosticDeleteOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetEntityTagResponse, + DiagnosticGetOptionalParams, + DiagnosticGetResponse, + DiagnosticListByServiceOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Diagnostic. */ export interface Diagnostic { - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams - ): Promise; - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams - ): Promise; + /** + * Lists all diagnostics of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams + ): Promise; + /** + * Creates a new Diagnostic or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Diagnostic specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Diagnostic Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Diagnostic. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service + * instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts index 6a9cc7551419..b1033613437d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts @@ -8,112 +8,112 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - DocumentationContract, - DocumentationListByServiceOptionalParams, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams -} from "../models"; + DocumentationContract, + DocumentationCreateOrUpdateOptionalParams, + DocumentationCreateOrUpdateResponse, + DocumentationDeleteOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetEntityTagResponse, + DocumentationGetOptionalParams, + DocumentationGetResponse, + DocumentationListByServiceOptionalParams, + DocumentationUpdateContract, + DocumentationUpdateOptionalParams, + DocumentationUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Documentation. */ export interface Documentation { - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams - ): Promise; - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams - ): Promise; + /** + * Lists all Documentations of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Documentation by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Documentation specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams + ): Promise; + /** + * Creates a new Documentation or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Documentation for an API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Documentation Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Documentation from an API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param documentationId Documentation identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts index daa6c97bed59..7b232b684feb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts @@ -8,108 +8,108 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - EmailTemplateContract, - EmailTemplateListByServiceOptionalParams, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams -} from "../models"; + EmailTemplateContract, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateCreateOrUpdateResponse, + EmailTemplateDeleteOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetEntityTagResponse, + EmailTemplateGetOptionalParams, + EmailTemplateGetResponse, + EmailTemplateListByServiceOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateUpdateParameters, + EmailTemplateUpdateResponse, + TemplateName +} from "../models/index.js"; /// /** Interface representing a EmailTemplate. */ export interface EmailTemplate { - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams - ): Promise; - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams - ): Promise; - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams - ): Promise; + /** + * Gets all email templates + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the email template specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams + ): Promise; + /** + * Updates an Email Template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param parameters Email Template update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates API Management email template + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams + ): Promise; + /** + * Reset the Email Template to default template provided by the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param templateName Email Template Name Identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts index 00a5b5b809c8..6b422afa0e4e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts @@ -8,164 +8,164 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayContract, - GatewayListByServiceOptionalParams, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse -} from "../models"; + GatewayContract, + GatewayCreateOrUpdateOptionalParams, + GatewayCreateOrUpdateResponse, + GatewayDeleteOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayGenerateTokenResponse, + GatewayGetEntityTagOptionalParams, + GatewayGetEntityTagResponse, + GatewayGetOptionalParams, + GatewayGetResponse, + GatewayKeyRegenerationRequestContract, + GatewayListByServiceOptionalParams, + GatewayListKeysOptionalParams, + GatewayListKeysResponse, + GatewayRegenerateKeyOptionalParams, + GatewayTokenRequestContract, + GatewayUpdateOptionalParams, + GatewayUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Gateway. */ export interface Gateway { - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams - ): Promise; - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams - ): Promise; - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams - ): Promise; - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams - ): Promise; - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams - ): Promise; - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams - ): Promise; + /** + * Lists a collection of gateways registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams + ): Promise; + /** + * Creates or updates a Gateway to be used in Api Management instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the gateway specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Gateway details. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams + ): Promise; + /** + * Deletes specific Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams + ): Promise; + /** + * Retrieves gateway keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams + ): Promise; + /** + * Regenerates specified gateway key invalidating any tokens created with it. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway key regeneration request contract properties. + * @param options The options parameters. + */ + regenerateKey( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams + ): Promise; + /** + * Gets the Shared Access Authorization Token for the gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param parameters Gateway token request contract properties. + * @param options The options parameters. + */ + generateToken( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts index 40fbda7aec7f..e8866875dcc1 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts @@ -8,78 +8,78 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiContract, - GatewayApiListByServiceOptionalParams, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams -} from "../models"; + ApiContract, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiCreateOrUpdateResponse, + GatewayApiDeleteOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiGetEntityTagResponse, + GatewayApiListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayApi. */ export interface GatewayApi { - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams - ): Promise; - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the APIs associated with a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that API entity specified by identifier is associated with the Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams + ): Promise; + /** + * Adds an API to the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param apiId API identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts index 8295474134eb..6a74ea7953c7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts @@ -8,105 +8,105 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams -} from "../models"; + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateResponse, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetEntityTagResponse, + GatewayCertificateAuthorityGetOptionalParams, + GatewayCertificateAuthorityGetResponse, + GatewayCertificateAuthorityListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayCertificateAuthority. */ export interface GatewayCertificateAuthority { - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams - ): Promise; - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams - ): Promise; - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams - ): Promise; - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams - ): Promise; + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams + ): Promise; + /** + * Get assigned Gateway Certificate Authority details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams + ): Promise; + /** + * Assign Certificate entity to Gateway entity as Certificate Authority. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param parameters Gateway certificate authority details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove relationship between Certificate Authority and Gateway entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param certificateId Identifier of the certificate entity. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts index 51859ce26a5e..6d6013078ec4 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts @@ -8,106 +8,106 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams -} from "../models"; + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateResponse, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetEntityTagResponse, + GatewayHostnameConfigurationGetOptionalParams, + GatewayHostnameConfigurationGetResponse, + GatewayHostnameConfigurationListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GatewayHostnameConfiguration. */ export interface GatewayHostnameConfiguration { - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams - ): Promise; - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams - ): Promise; - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams - ): Promise; + /** + * Lists the collection of hostname configurations for the specified gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that hostname configuration entity specified by identifier exists for specified Gateway + * entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams + ): Promise; + /** + * Get details of a hostname configuration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams + ): Promise; + /** + * Creates of updates hostname configuration for a Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param parameters Gateway hostname configuration details. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified hostname configuration from the specified Gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service + * instance. Must not have value 'managed' + * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway + * entity. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts index a41c3a8d9396..ba97ddd7c360 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts @@ -6,109 +6,109 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - GlobalSchemaContract, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams -} from "../models"; + GlobalSchemaContract, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaCreateOrUpdateResponse, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetEntityTagResponse, + GlobalSchemaGetOptionalParams, + GlobalSchemaGetResponse, + GlobalSchemaListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a GlobalSchema. */ export interface GlobalSchema { - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams - ): Promise; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams - ): Promise; + /** + * Lists a collection of schemas registered with service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Schema specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams + ): Promise; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GlobalSchemaCreateOrUpdateResponse + > + >; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes specific Schema. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts index a26be7a75349..51b8d418898d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts @@ -8,130 +8,130 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ResolverContract, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams -} from "../models"; + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateResponse, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetEntityTagResponse, + GraphQLApiResolverGetOptionalParams, + GraphQLApiResolverGetResponse, + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverUpdateResponse, + ResolverContract, + ResolverUpdateContract +} from "../models/index.js"; /// /** Interface representing a GraphQLApiResolver. */ export interface GraphQLApiResolver { - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams - ): Promise; - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams - ): Promise; - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the resolvers for the specified GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the GraphQL API Resolver specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams + ): Promise; + /** + * Creates a new resolver in the GraphQL API or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the resolver in the GraphQL API specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters GraphQL API Resolver Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams + ): Promise; + /** + * Deletes the specified resolver in the GraphQL API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts index d2bba1d665a9..72f4d60cdfbf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts @@ -8,117 +8,117 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverOptionalParams, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams -} from "../models"; + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateResponse, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetEntityTagResponse, + GraphQLApiResolverPolicyGetOptionalParams, + GraphQLApiResolverPolicyGetResponse, + GraphQLApiResolverPolicyListByResolverOptionalParams, + PolicyContract, + PolicyIdName +} from "../models/index.js"; /// /** Interface representing a GraphQLApiResolverPolicy. */ export interface GraphQLApiResolverPolicy { - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams - ): Promise; + /** + * Get the list of policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param options The options parameters. + */ + listByResolver( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the GraphQL API Resolver level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the GraphQL Api Resolver. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API + * Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts index 2be3ae28bb90..70002fc60994 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts @@ -8,108 +8,108 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GroupContract, - GroupListByServiceOptionalParams, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams -} from "../models"; + GroupContract, + GroupCreateOrUpdateOptionalParams, + GroupCreateOrUpdateResponse, + GroupCreateParameters, + GroupDeleteOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetEntityTagResponse, + GroupGetOptionalParams, + GroupGetResponse, + GroupListByServiceOptionalParams, + GroupUpdateOptionalParams, + GroupUpdateParameters, + GroupUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Group. */ export interface Group { - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams - ): Promise; - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams - ): Promise; - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams - ): Promise; + /** + * Lists a collection of groups defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams + ): Promise; + /** + * Creates or Updates a group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the group specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams + ): Promise; + /** + * Deletes specific group of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts index 3eb645744d60..10b661b59a34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts @@ -8,74 +8,74 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserContract, - GroupUserListOptionalParams, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams -} from "../models"; + GroupUserCheckEntityExistsOptionalParams, + GroupUserCheckEntityExistsResponse, + GroupUserCreateOptionalParams, + GroupUserCreateResponse, + GroupUserDeleteOptionalParams, + GroupUserListOptionalParams, + UserContract +} from "../models/index.js"; /// /** Interface representing a GroupUser. */ export interface GroupUser { - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams - ): Promise; - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams - ): Promise; - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams - ): Promise; + /** + * Lists a collection of user entities associated with the group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that user entity specified by identifier is associated with the group entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams + ): Promise; + /** + * Add existing user to existing group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams + ): Promise; + /** + * Remove existing user from existing group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts index c5317c014fbb..a0298ac44271 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts @@ -8,124 +8,124 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IdentityProviderContract, - IdentityProviderListByServiceOptionalParams, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse -} from "../models"; + IdentityProviderContract, + IdentityProviderCreateContract, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderCreateOrUpdateResponse, + IdentityProviderDeleteOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetEntityTagResponse, + IdentityProviderGetOptionalParams, + IdentityProviderGetResponse, + IdentityProviderListByServiceOptionalParams, + IdentityProviderListSecretsOptionalParams, + IdentityProviderListSecretsResponse, + IdentityProviderType, + IdentityProviderUpdateOptionalParams, + IdentityProviderUpdateParameters, + IdentityProviderUpdateResponse +} from "../models/index.js"; /// /** Interface representing a IdentityProvider. */ export interface IdentityProvider { - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams - ): Promise; - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams - ): Promise; - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams - ): Promise; - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams - ): Promise; + /** + * Lists a collection of Identity Provider configured in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the identityProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams + ): Promise; + /** + * Gets the configuration details of the identity Provider configured in specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams + ): Promise; + /** + * Creates or Updates the IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing IdentityProvider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams + ): Promise; + /** + * Deletes the specified identity provider configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the Identity Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param identityProviderName Identity Provider Type identifier. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts index 83434e88bcd2..c6971639d6be 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts @@ -6,91 +6,91 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./api"; -export * from "./apiRevision"; -export * from "./apiRelease"; -export * from "./apiOperation"; -export * from "./apiOperationPolicy"; -export * from "./tag"; -export * from "./graphQLApiResolver"; -export * from "./graphQLApiResolverPolicy"; -export * from "./apiProduct"; -export * from "./apiPolicy"; -export * from "./apiSchema"; -export * from "./apiDiagnostic"; -export * from "./apiIssue"; -export * from "./apiIssueComment"; -export * from "./apiIssueAttachment"; -export * from "./apiTagDescription"; -export * from "./operationOperations"; -export * from "./apiWiki"; -export * from "./apiWikis"; -export * from "./apiExport"; -export * from "./apiVersionSet"; -export * from "./authorizationServer"; -export * from "./authorizationProvider"; -export * from "./authorization"; -export * from "./authorizationLoginLinks"; -export * from "./authorizationAccessPolicy"; -export * from "./backend"; -export * from "./cache"; -export * from "./certificate"; -export * from "./contentType"; -export * from "./contentItem"; -export * from "./deletedServices"; -export * from "./apiManagementOperations"; -export * from "./apiManagementServiceSkus"; -export * from "./apiManagementService"; -export * from "./diagnostic"; -export * from "./emailTemplate"; -export * from "./gateway"; -export * from "./gatewayHostnameConfiguration"; -export * from "./gatewayApi"; -export * from "./gatewayCertificateAuthority"; -export * from "./group"; -export * from "./groupUser"; -export * from "./identityProvider"; -export * from "./issue"; -export * from "./logger"; -export * from "./namedValue"; -export * from "./networkStatus"; -export * from "./notification"; -export * from "./notificationRecipientUser"; -export * from "./notificationRecipientEmail"; -export * from "./openIdConnectProvider"; -export * from "./outboundNetworkDependenciesEndpoints"; -export * from "./policy"; -export * from "./policyDescription"; -export * from "./policyFragment"; -export * from "./portalConfig"; -export * from "./portalRevision"; -export * from "./portalSettings"; -export * from "./signInSettings"; -export * from "./signUpSettings"; -export * from "./delegationSettings"; -export * from "./privateEndpointConnectionOperations"; -export * from "./product"; -export * from "./productApi"; -export * from "./productGroup"; -export * from "./productSubscriptions"; -export * from "./productPolicy"; -export * from "./productWiki"; -export * from "./productWikis"; -export * from "./quotaByCounterKeys"; -export * from "./quotaByPeriodKeys"; -export * from "./region"; -export * from "./reports"; -export * from "./globalSchema"; -export * from "./tenantSettings"; -export * from "./apiManagementSkus"; -export * from "./subscription"; -export * from "./tagResource"; -export * from "./tenantAccess"; -export * from "./tenantAccessGit"; -export * from "./tenantConfiguration"; -export * from "./user"; -export * from "./userGroup"; -export * from "./userSubscription"; -export * from "./userIdentities"; -export * from "./userConfirmationPassword"; -export * from "./documentation"; +export * from "./api.js"; +export * from "./apiDiagnostic.js"; +export * from "./apiExport.js"; +export * from "./apiIssue.js"; +export * from "./apiIssueAttachment.js"; +export * from "./apiIssueComment.js"; +export * from "./apiManagementOperations.js"; +export * from "./apiManagementService.js"; +export * from "./apiManagementServiceSkus.js"; +export * from "./apiManagementSkus.js"; +export * from "./apiOperation.js"; +export * from "./apiOperationPolicy.js"; +export * from "./apiPolicy.js"; +export * from "./apiProduct.js"; +export * from "./apiRelease.js"; +export * from "./apiRevision.js"; +export * from "./apiSchema.js"; +export * from "./apiTagDescription.js"; +export * from "./apiVersionSet.js"; +export * from "./apiWiki.js"; +export * from "./apiWikis.js"; +export * from "./authorization.js"; +export * from "./authorizationAccessPolicy.js"; +export * from "./authorizationLoginLinks.js"; +export * from "./authorizationProvider.js"; +export * from "./authorizationServer.js"; +export * from "./backend.js"; +export * from "./cache.js"; +export * from "./certificate.js"; +export * from "./contentItem.js"; +export * from "./contentType.js"; +export * from "./delegationSettings.js"; +export * from "./deletedServices.js"; +export * from "./diagnostic.js"; +export * from "./documentation.js"; +export * from "./emailTemplate.js"; +export * from "./gateway.js"; +export * from "./gatewayApi.js"; +export * from "./gatewayCertificateAuthority.js"; +export * from "./gatewayHostnameConfiguration.js"; +export * from "./globalSchema.js"; +export * from "./graphQLApiResolver.js"; +export * from "./graphQLApiResolverPolicy.js"; +export * from "./group.js"; +export * from "./groupUser.js"; +export * from "./identityProvider.js"; +export * from "./issue.js"; +export * from "./logger.js"; +export * from "./namedValue.js"; +export * from "./networkStatus.js"; +export * from "./notification.js"; +export * from "./notificationRecipientEmail.js"; +export * from "./notificationRecipientUser.js"; +export * from "./openIdConnectProvider.js"; +export * from "./operationOperations.js"; +export * from "./outboundNetworkDependenciesEndpoints.js"; +export * from "./policy.js"; +export * from "./policyDescription.js"; +export * from "./policyFragment.js"; +export * from "./portalConfig.js"; +export * from "./portalRevision.js"; +export * from "./portalSettings.js"; +export * from "./privateEndpointConnectionOperations.js"; +export * from "./product.js"; +export * from "./productApi.js"; +export * from "./productGroup.js"; +export * from "./productPolicy.js"; +export * from "./productSubscriptions.js"; +export * from "./productWiki.js"; +export * from "./productWikis.js"; +export * from "./quotaByCounterKeys.js"; +export * from "./quotaByPeriodKeys.js"; +export * from "./region.js"; +export * from "./reports.js"; +export * from "./signInSettings.js"; +export * from "./signUpSettings.js"; +export * from "./subscription.js"; +export * from "./tag.js"; +export * from "./tagResource.js"; +export * from "./tenantAccess.js"; +export * from "./tenantAccessGit.js"; +export * from "./tenantConfiguration.js"; +export * from "./tenantSettings.js"; +export * from "./user.js"; +export * from "./userConfirmationPassword.js"; +export * from "./userGroup.js"; +export * from "./userIdentities.js"; +export * from "./userSubscription.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts index 9b26a41c56f2..8570c1a70fb5 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts @@ -8,37 +8,37 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - IssueContract, - IssueListByServiceOptionalParams, - IssueGetOptionalParams, - IssueGetResponse -} from "../models"; + IssueContract, + IssueGetOptionalParams, + IssueGetResponse, + IssueListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a Issue. */ export interface Issue { - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams - ): Promise; + /** + * Lists a collection of issues in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets API Management issue details + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param issueId Issue identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts index 8ec31d0af0c0..a1dc00819e39 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts @@ -8,107 +8,107 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - LoggerContract, - LoggerListByServiceOptionalParams, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams -} from "../models"; + LoggerContract, + LoggerCreateOrUpdateOptionalParams, + LoggerCreateOrUpdateResponse, + LoggerDeleteOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetEntityTagResponse, + LoggerGetOptionalParams, + LoggerGetResponse, + LoggerListByServiceOptionalParams, + LoggerUpdateContract, + LoggerUpdateOptionalParams, + LoggerUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Logger. */ export interface Logger { - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams - ): Promise; - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams - ): Promise; - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams - ): Promise; + /** + * Lists a collection of loggers in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the logger specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams + ): Promise; + /** + * Creates or Updates a logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams + ): Promise; + /** + * Deletes the specified logger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param loggerId Logger identifier. Must be unique in the API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts index d325fdb15112..49578d95ff14 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts @@ -6,202 +6,202 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - NamedValueContract, - NamedValueListByServiceOptionalParams, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse -} from "../models"; + NamedValueContract, + NamedValueCreateContract, + NamedValueCreateOrUpdateOptionalParams, + NamedValueCreateOrUpdateResponse, + NamedValueDeleteOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetEntityTagResponse, + NamedValueGetOptionalParams, + NamedValueGetResponse, + NamedValueListByServiceOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListValueResponse, + NamedValueRefreshSecretOptionalParams, + NamedValueRefreshSecretResponse, + NamedValueUpdateOptionalParams, + NamedValueUpdateParameters, + NamedValueUpdateResponse +} from "../models/index.js"; /// /** Interface representing a NamedValue. */ export interface NamedValue { - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams - ): Promise; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - >; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - >; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams - ): Promise; - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams - ): Promise; - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams - ): Promise; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - >; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams - ): Promise; + /** + * Lists a collection of named values defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams + ): Promise; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueCreateOrUpdateResponse + > + >; + /** + * Creates or updates named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param parameters Create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueUpdateResponse + > + >; + /** + * Updates the specific named value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams + ): Promise; + /** + * Deletes specific named value from the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams + ): Promise; + /** + * Gets the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + listValue( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams + ): Promise; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + beginRefreshSecret( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NamedValueRefreshSecretResponse + > + >; + /** + * Refresh the secret of the named value specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param namedValueId Identifier of the NamedValue. + * @param options The options parameters. + */ + beginRefreshSecretAndWait( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts index 6bed7641b6b9..3bf3761b25f9 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts @@ -7,39 +7,39 @@ */ import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse -} from "../models"; + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByLocationResponse, + NetworkStatusListByServiceOptionalParams, + NetworkStatusListByServiceResponse +} from "../models/index.js"; /** Interface representing a NetworkStatus. */ export interface NetworkStatus { - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams - ): Promise; - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams - ): Promise; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams + ): Promise; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends + * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param locationName Location in which the API Management service is deployed. This is one of the + * Azure Regions like West US, East US, South Central US. + * @param options The options parameters. + */ + listByLocation( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts index 344725e96540..12a58468a5fd 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts @@ -8,53 +8,53 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - NotificationContract, - NotificationListByServiceOptionalParams, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse -} from "../models"; + NotificationContract, + NotificationCreateOrUpdateOptionalParams, + NotificationCreateOrUpdateResponse, + NotificationGetOptionalParams, + NotificationGetResponse, + NotificationListByServiceOptionalParams, + NotificationName +} from "../models/index.js"; /// /** Interface representing a Notification. */ export interface Notification { - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams - ): Promise; - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams - ): Promise; + /** + * Lists a collection of properties defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the Notification specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams + ): Promise; + /** + * Create or Update API Management publisher notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts index 0d0742d5c743..165b4fc06b94 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts @@ -7,74 +7,74 @@ */ import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailCheckEntityExistsResponse, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCreateOrUpdateResponse, + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, + NotificationRecipientEmailListByNotificationResponse +} from "../models/index.js"; /** Interface representing a NotificationRecipientEmail. */ export interface NotificationRecipientEmail { - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams - ): Promise; - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams - ): Promise; + /** + * Gets the list of the Notification Recipient Emails subscribed to a notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams + ): Promise; + /** + * Determine if Notification Recipient Email subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the Email address to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the email from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param email Email identifier. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts index 1e31f45716ba..9c3537352f1e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts @@ -7,74 +7,74 @@ */ import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams -} from "../models"; + NotificationName, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserCheckEntityExistsResponse, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCreateOrUpdateResponse, + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, + NotificationRecipientUserListByNotificationResponse +} from "../models/index.js"; /** Interface representing a NotificationRecipientUser. */ export interface NotificationRecipientUser { - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams - ): Promise; - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams - ): Promise; - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams - ): Promise; + /** + * Gets the list of the Notification Recipient User subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param options The options parameters. + */ + listByNotification( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams + ): Promise; + /** + * Determine if the Notification Recipient User is subscribed to the notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the API Management User to the list of Recipients for the Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams + ): Promise; + /** + * Removes the API Management user from the list of Notification. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param notificationName Notification Name Identifier. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts index 580369d0e3de..b03b8decdb38 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts @@ -8,122 +8,122 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse -} from "../models"; + OpenidConnectProviderContract, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateResponse, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetEntityTagResponse, + OpenIdConnectProviderGetOptionalParams, + OpenIdConnectProviderGetResponse, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListSecretsResponse, + OpenidConnectProviderUpdateContract, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderUpdateResponse +} from "../models/index.js"; /// /** Interface representing a OpenIdConnectProvider. */ export interface OpenIdConnectProvider { - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams - ): Promise; - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams - ): Promise; - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams - ): Promise; - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams - ): Promise; - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams - ): Promise; + /** + * Lists of all the OpenId Connect Providers. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams + ): Promise; + /** + * Gets specific OpenID Connect Provider without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams + ): Promise; + /** + * Creates or updates the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the specific OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams + ): Promise; + /** + * Deletes specific OpenID Connect Provider of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams + ): Promise; + /** + * Gets the client secret details of the OpenID Connect Provider. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param opid Identifier of the OpenID Connect Provider. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts index f5415a244e27..e7471227242b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts @@ -8,25 +8,25 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagResourceContract, - OperationListByTagsOptionalParams -} from "../models"; + OperationListByTagsOptionalParams, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a OperationOperations. */ export interface OperationOperations { - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists a collection of operations associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts index dd3d17095902..9f0c139ec76e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts @@ -7,21 +7,21 @@ */ import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse -} from "../models"; + OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + OutboundNetworkDependenciesEndpointsListByServiceResponse +} from "../models/index.js"; /** Interface representing a OutboundNetworkDependenciesEndpoints. */ export interface OutboundNetworkDependenciesEndpoints { - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - ): Promise; + /** + * Gets the network endpoints of all outbound dependencies of a ApiManagement service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts index 84d9f55f2198..a54dd508c73d 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts @@ -7,87 +7,87 @@ */ import { - PolicyListByServiceOptionalParams, - PolicyListByServiceResponse, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyContract, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyCreateOrUpdateOptionalParams, + PolicyCreateOrUpdateResponse, + PolicyDeleteOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetEntityTagResponse, + PolicyGetOptionalParams, + PolicyGetResponse, + PolicyIdName, + PolicyListByServiceOptionalParams, + PolicyListByServiceResponse +} from "../models/index.js"; /** Interface representing a Policy. */ export interface Policy { - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams - ): Promise; - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams - ): Promise; + /** + * Lists all the Global Policy definitions of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the Global policy definition of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams + ): Promise; + /** + * Creates or updates the global policy configuration of the Api Management service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the global policy configuration of the Api Management Service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts index 452f51ef1fdd..0c630cb5e324 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts @@ -7,21 +7,21 @@ */ import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse -} from "../models"; + PolicyDescriptionListByServiceOptionalParams, + PolicyDescriptionListByServiceResponse +} from "../models/index.js"; /** Interface representing a PolicyDescription. */ export interface PolicyDescription { - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams - ): Promise; + /** + * Lists all policy descriptions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts index 171bfa2f20c0..dbdc6b50da24 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts @@ -6,123 +6,123 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentListByServiceResponse, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentContract, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse -} from "../models"; + PolicyFragmentContract, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentCreateOrUpdateResponse, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetEntityTagResponse, + PolicyFragmentGetOptionalParams, + PolicyFragmentGetResponse, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentListByServiceResponse, + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListReferencesResponse +} from "../models/index.js"; /** Interface representing a PolicyFragment. */ export interface PolicyFragment { - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams - ): Promise; - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams - ): Promise; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - >; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams - ): Promise; - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams - ): Promise; + /** + * Gets all policy fragments. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams + ): Promise; + /** + * Gets a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams + ): Promise; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PolicyFragmentCreateOrUpdateResponse + > + >; + /** + * Creates or updates a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param parameters The policy fragment contents to apply. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams + ): Promise; + /** + * Lists policy resources that reference the policy fragment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param id A resource identifier. + * @param options The options parameters. + */ + listReferences( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts index d32c7d0eb75b..f8ce29b65c97 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts @@ -7,92 +7,92 @@ */ import { - PortalConfigListByServiceOptionalParams, - PortalConfigListByServiceResponse, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigContract, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse -} from "../models"; + PortalConfigContract, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigCreateOrUpdateResponse, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetEntityTagResponse, + PortalConfigGetOptionalParams, + PortalConfigGetResponse, + PortalConfigListByServiceOptionalParams, + PortalConfigListByServiceResponse, + PortalConfigUpdateOptionalParams, + PortalConfigUpdateResponse +} from "../models/index.js"; /** Interface representing a PortalConfig. */ export interface PortalConfig { - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams - ): Promise; - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams - ): Promise; - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams - ): Promise; - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams - ): Promise; - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams - ): Promise; + /** + * Lists the developer portal configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams + ): Promise; + /** + * Gets the entity state (Etag) version of the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams + ): Promise; + /** + * Get the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams + ): Promise; + /** + * Update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams + ): Promise; + /** + * Create or update the developer portal configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalConfigId Portal configuration identifier. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update the developer portal configuration. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts index e0f92866e5f3..00cbc59dfe46 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts @@ -6,143 +6,143 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - PortalRevisionContract, - PortalRevisionListByServiceOptionalParams, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse -} from "../models"; + PortalRevisionContract, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionCreateOrUpdateResponse, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetEntityTagResponse, + PortalRevisionGetOptionalParams, + PortalRevisionGetResponse, + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionUpdateResponse +} from "../models/index.js"; /// /** Interface representing a PortalRevision. */ export interface PortalRevision { - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams - ): Promise; - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams - ): Promise; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - >; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - >; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams - ): Promise; + /** + * Lists developer portal's revisions. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the developer portal revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams + ): Promise; + /** + * Gets the developer portal's revision specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams + ): Promise; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionCreateOrUpdateResponse + > + >; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` + * property indicates if the revision is publicly accessible. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PortalRevisionUpdateResponse + > + >; + /** + * Updates the description of specified portal revision or makes it current. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management + * service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Portal Revision's contract details. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts index a7ce1b08a936..d9e3cf5bcb5f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts @@ -7,21 +7,21 @@ */ import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse -} from "../models"; + PortalSettingsListByServiceOptionalParams, + PortalSettingsListByServiceResponse +} from "../models/index.js"; /** Interface representing a PortalSettings. */ export interface PortalSettings { - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams - ): Promise; + /** + * Lists a collection of portalsettings defined within a service instance.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts index b6f6c5b9b32b..a3763216a7d7 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts @@ -6,133 +6,133 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse -} from "../models"; + PrivateEndpointConnection, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionCreateOrUpdateResponse, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, + PrivateEndpointConnectionGetByNameResponse, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceResponse, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionListPrivateLinkResourcesResponse, + PrivateEndpointConnectionRequest +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnectionOperations. */ export interface PrivateEndpointConnectionOperations { - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams - ): Promise; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - >; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - ): Promise; + /** + * Lists all private endpoint connections of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the details of the Private Endpoint Connection specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + getByName( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams + ): Promise; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PrivateEndpointConnectionCreateOrUpdateResponse + > + >; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified Private Endpoint Connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams + ): Promise; + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listPrivateLinkResources( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams + ): Promise; + /** + * Gets the private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param privateLinkSubResourceName Name of the private link resource. + * @param options The options parameters. + */ + getPrivateLinkResource( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts index f6a72fe292f0..969d91734a3c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts @@ -8,120 +8,120 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ProductContract, - ProductListByServiceOptionalParams, - TagResourceContract, - ProductListByTagsOptionalParams, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams -} from "../models"; + ProductContract, + ProductCreateOrUpdateOptionalParams, + ProductCreateOrUpdateResponse, + ProductDeleteOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetEntityTagResponse, + ProductGetOptionalParams, + ProductGetResponse, + ProductListByServiceOptionalParams, + ProductListByTagsOptionalParams, + ProductUpdateOptionalParams, + ProductUpdateParameters, + ProductUpdateResponse, + TagResourceContract +} from "../models/index.js"; /// /** Interface representing a Product. */ export interface Product { - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams - ): Promise; - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams - ): Promise; - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams - ): Promise; - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams - ): Promise; + /** + * Lists a collection of products in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of products associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByTags( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams + ): Promise; + /** + * Creates or Updates a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams + ): Promise; + /** + * Update existing product details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams + ): Promise; + /** + * Delete product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts index 7051be981009..dcd5f958b026 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts @@ -8,77 +8,77 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ApiContract, - ProductApiListByProductOptionalParams, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams -} from "../models"; + ApiContract, + ProductApiCheckEntityExistsOptionalParams, + ProductApiCheckEntityExistsResponse, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCreateOrUpdateResponse, + ProductApiDeleteOptionalParams, + ProductApiListByProductOptionalParams +} from "../models/index.js"; /// /** Interface representing a ProductApi. */ export interface ProductApi { - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams - ): Promise; + /** + * Lists a collection of the APIs associated with a product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that API entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds an API to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified API from the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts index e44872094a3d..09f26ba8ac33 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts @@ -8,74 +8,74 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - GroupContract, - ProductGroupListByProductOptionalParams, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams -} from "../models"; + GroupContract, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupCheckEntityExistsResponse, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCreateOrUpdateResponse, + ProductGroupDeleteOptionalParams, + ProductGroupListByProductOptionalParams +} from "../models/index.js"; /// /** Interface representing a ProductGroup. */ export interface ProductGroup { - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams - ): Promise; - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams - ): Promise; + /** + * Lists the collection of developer groups associated with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Checks that Group entity specified by identifier is associated with the Product entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + checkEntityExists( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams + ): Promise; + /** + * Adds the association between the specified developer group with the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the association between the specified group and product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param groupId Group identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts index 9f08f040cfb3..ec2c536bad34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts @@ -7,97 +7,97 @@ */ import { - ProductPolicyListByProductOptionalParams, - ProductPolicyListByProductResponse, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - PolicyContract, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams -} from "../models"; + PolicyContract, + PolicyIdName, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyCreateOrUpdateResponse, + ProductPolicyDeleteOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetEntityTagResponse, + ProductPolicyGetOptionalParams, + ProductPolicyGetResponse, + ProductPolicyListByProductOptionalParams, + ProductPolicyListByProductResponse +} from "../models/index.js"; /** Interface representing a ProductPolicy. */ export interface ProductPolicy { - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams - ): Promise; - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams - ): Promise; - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams - ): Promise; - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams - ): Promise; + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams + ): Promise; + /** + * Get the ETag of the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams + ): Promise; + /** + * Get the policy configuration at the Product level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams + ): Promise; + /** + * Creates or updates policy configuration for the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param parameters The policy contents to apply. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the policy configuration at the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param policyId The identifier of the Policy. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts index 804f5bf882b7..cf547f36a38c 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - ProductSubscriptionsListOptionalParams -} from "../models"; + ProductSubscriptionsListOptionalParams, + SubscriptionContract +} from "../models/index.js"; /// /** Interface representing a ProductSubscriptions. */ export interface ProductSubscriptions { - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists the collection of subscriptions to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts index 540bdf5fa04a..233e64d7bdaf 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts @@ -7,94 +7,94 @@ */ import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams -} from "../models"; + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiCreateOrUpdateResponse, + ProductWikiDeleteOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetEntityTagResponse, + ProductWikiGetOptionalParams, + ProductWikiGetResponse, + ProductWikiUpdateOptionalParams, + ProductWikiUpdateResponse, + WikiContract, + WikiUpdateContract +} from "../models/index.js"; /** Interface representing a ProductWiki. */ export interface ProductWiki { - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams - ): Promise; - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams - ): Promise; - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams + ): Promise; + /** + * Creates a new Wiki for a Product or updates an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Wiki Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Wiki from a Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts index 878251c2a6a7..44f51de62077 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ProductWikisListOptionalParams } from "../models"; +import { ProductWikisListOptionalParams, WikiContract } from "../models/index.js"; /// /** Interface representing a ProductWikis. */ export interface ProductWikis { - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Gets the details of the Wiki for a Product specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts index 8b06db3207dd..2115a18e1d34 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts @@ -7,49 +7,49 @@ */ import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse -} from "../models"; + QuotaByCounterKeysListByServiceOptionalParams, + QuotaByCounterKeysListByServiceResponse, + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; /** Interface representing a QuotaByCounterKeys. */ export interface QuotaByCounterKeys { - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams - ): Promise; - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams - ): Promise; + /** + * Lists a collection of current quota counter periods associated with the counter-key configured in + * the policy on the specified service instance. The api does not support paging yet. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams + ): Promise; + /** + * Updates all the quota counter values specified with the existing quota counter key to a value in the + * specified service instance. This should be used for reset of the quota counter values. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param parameters The value of the quota counter to be applied to all quota counter periods. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts index 49641b09add3..af55942a0e7e 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts @@ -7,52 +7,52 @@ */ import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse -} from "../models"; + QuotaByPeriodKeysGetOptionalParams, + QuotaByPeriodKeysGetResponse, + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysUpdateResponse, + QuotaCounterValueUpdateContract +} from "../models/index.js"; /** Interface representing a QuotaByPeriodKeys. */ export interface QuotaByPeriodKeys { - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams - ): Promise; - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams - ): Promise; + /** + * Gets the value of the quota counter associated with the counter-key in the policy for the specific + * period in service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams + ): Promise; + /** + * Updates an existing quota counter value in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in + * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in + * the policy, then it’s accessible by "boo" counter key. But if it’s defined as + * counter-key="@("b"+"a")" then it will be accessible by "ba" key + * @param quotaPeriodKey Quota period key identifier. + * @param parameters The value of the Quota counter to be applied on the specified period. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts index b65177a34f8c..6de63e394ac3 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts @@ -7,20 +7,20 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { RegionContract, RegionListByServiceOptionalParams } from "../models"; +import { RegionContract, RegionListByServiceOptionalParams } from "../models/index.js"; /// /** Interface representing a Region. */ export interface Region { - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all azure regions in which the service exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts index 0069ea94bbfc..bdd8e7111a89 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts @@ -8,198 +8,198 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ReportRecordContract, - ReportsListByApiOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListByTimeOptionalParams, - RequestReportRecordContract, - ReportsListByRequestOptionalParams -} from "../models"; + ReportRecordContract, + ReportsListByApiOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByRequestOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListByUserOptionalParams, + RequestReportRecordContract +} from "../models/index.js"; /// /** Interface representing a Reports. */ export interface Reports { - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists report records by API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter The filter to apply on the operation. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | + * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| + * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter + * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | + * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| + * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | + *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| + * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| + * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | + * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | + * | |
+ * @param options The options parameters. + */ + listByUser( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by API Operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | + * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy + * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, + * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | + * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | + * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | + *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| + * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | + * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | + * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | + * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | + *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| + * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by geography. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| country | select | | |
| region | select | | |
| zip | + * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | + *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | + * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | + * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | + *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| + * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg + * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listByGeo( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | + *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| + * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | + *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | + * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, + * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | + * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, + * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | + * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| + * serviceTimeMax | select | | |
+ * @param options The options parameters. + */ + listBySubscription( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Time. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select + * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | + *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | + * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | + *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| + * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth + * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | + * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | + * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| + * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
+ * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The + * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can + * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, + * minutes, seconds)). + * @param options The options parameters. + */ + listByTime( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists report records by Request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param filter | Field | Usage | Supported operators | Supported functions + * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le + * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId + * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | + *
| subscriptionId | filter | eq | |
+ * @param options The options parameters. + */ + listByRequest( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts index 1c4b94321adb..336e2fbc5573 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts @@ -7,67 +7,67 @@ */ import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse -} from "../models"; + PortalSigninSettings, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsCreateOrUpdateResponse, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetEntityTagResponse, + SignInSettingsGetOptionalParams, + SignInSettingsGetResponse, + SignInSettingsUpdateOptionalParams +} from "../models/index.js"; /** Interface representing a SignInSettings. */ export interface SignInSettings { - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams - ): Promise; - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the SignInSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Sign In Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams + ): Promise; + /** + * Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-In settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Sign-In settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts index 1dbcacd372e8..10819d6216b2 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts @@ -7,67 +7,67 @@ */ import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse -} from "../models"; + PortalSignupSettings, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsCreateOrUpdateResponse, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetEntityTagResponse, + SignUpSettingsGetOptionalParams, + SignUpSettingsGetResponse, + SignUpSettingsUpdateOptionalParams +} from "../models/index.js"; /** Interface representing a SignUpSettings. */ export interface SignUpSettings { - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams - ): Promise; - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams - ): Promise; - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams - ): Promise; - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams - ): Promise; + /** + * Gets the entity state (Etag) version of the SignUpSettings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams + ): Promise; + /** + * Get Sign Up Settings for the Portal + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams + ): Promise; + /** + * Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update Sign-Up settings. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams + ): Promise; + /** + * Create or Update Sign-Up settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts index 74d50388f102..95630ff3e2f0 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts @@ -8,159 +8,159 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - SubscriptionListOptionalParams, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse -} from "../models"; + SubscriptionContract, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionCreateOrUpdateResponse, + SubscriptionCreateParameters, + SubscriptionDeleteOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetEntityTagResponse, + SubscriptionGetOptionalParams, + SubscriptionGetResponse, + SubscriptionListOptionalParams, + SubscriptionListSecretsOptionalParams, + SubscriptionListSecretsResponse, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionUpdateParameters, + SubscriptionUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Subscription. */ export interface Subscription { - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams - ): Promise; - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams - ): Promise; - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams - ): Promise; - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams - ): Promise; - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams - ): Promise; - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams - ): Promise; + /** + * Lists all subscriptions of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams + ): Promise; + /** + * Gets the specified Subscription entity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams + ): Promise; + /** + * Creates or updates the subscription of specified user to the specified product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of a subscription specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams + ): Promise; + /** + * Deletes the specified subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams + ): Promise; + /** + * Regenerates primary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerates secondary key of existing subscription of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams + ): Promise; + /** + * Gets the specified Subscription keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts index dca054554a45..22dc9aaf7a03 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts @@ -8,375 +8,375 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagContract, - TagListByOperationOptionalParams, - TagListByApiOptionalParams, - TagListByProductOptionalParams, - TagListByServiceOptionalParams, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams -} from "../models"; + TagAssignToApiOptionalParams, + TagAssignToApiResponse, + TagAssignToOperationOptionalParams, + TagAssignToOperationResponse, + TagAssignToProductOptionalParams, + TagAssignToProductResponse, + TagContract, + TagCreateOrUpdateOptionalParams, + TagCreateOrUpdateResponse, + TagCreateUpdateParameters, + TagDeleteOptionalParams, + TagDetachFromApiOptionalParams, + TagDetachFromOperationOptionalParams, + TagDetachFromProductOptionalParams, + TagGetByApiOptionalParams, + TagGetByApiResponse, + TagGetByOperationOptionalParams, + TagGetByOperationResponse, + TagGetByProductOptionalParams, + TagGetByProductResponse, + TagGetEntityStateByApiOptionalParams, + TagGetEntityStateByApiResponse, + TagGetEntityStateByOperationOptionalParams, + TagGetEntityStateByOperationResponse, + TagGetEntityStateByProductOptionalParams, + TagGetEntityStateByProductResponse, + TagGetEntityStateOptionalParams, + TagGetEntityStateResponse, + TagGetOptionalParams, + TagGetResponse, + TagListByApiOptionalParams, + TagListByOperationOptionalParams, + TagListByProductOptionalParams, + TagListByServiceOptionalParams, + TagUpdateOptionalParams, + TagUpdateResponse +} from "../models/index.js"; /// /** Interface representing a Tag. */ export interface Tag { - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams - ): Promise; - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams - ): Promise; - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams - ): Promise; - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams - ): Promise; - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams - ): Promise; - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams - ): Promise; - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams - ): Promise; - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams - ): Promise; - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams - ): Promise; - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams - ): Promise; - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams - ): Promise; - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams - ): Promise; - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams - ): Promise; + /** + * Lists all Tags associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param options The options parameters. + */ + listByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all Tags associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param options The options parameters. + */ + listByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all Tags associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + listByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists a collection of tags defined within a service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams + ): Promise; + /** + * Get tag associated with the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams + ): Promise; + /** + * Assign tag to the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams + ): Promise; + /** + * Detach the tag from the Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param operationId Operation identifier within an API. Must be unique in the current API Management + * service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromOperation( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams + ): Promise; + /** + * Get tag associated with the API. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams + ): Promise; + /** + * Assign tag to the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams + ): Promise; + /** + * Detach the tag from the Api. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param apiId API revision identifier. Must be unique in the current API Management service instance. + * Non-current revision has ;rev=n as a suffix where n is the revision number. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromApi( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityStateByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams + ): Promise; + /** + * Get tag associated with the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getByProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams + ): Promise; + /** + * Assign tag to the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + assignToProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams + ): Promise; + /** + * Detach the tag from the Product. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param productId Product identifier. Must be unique in the current API Management service instance. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + detachFromProduct( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams + ): Promise; + /** + * Gets the entity state version of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityState( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams + ): Promise; + /** + * Gets the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams + ): Promise; + /** + * Creates a tag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param parameters Create parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the tag specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams + ): Promise; + /** + * Deletes specific tag of the API Management service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param tagId Tag identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts index 9290bd0da6f0..cdc419c93ceb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts @@ -8,22 +8,22 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TagResourceContract, - TagResourceListByServiceOptionalParams -} from "../models"; + TagResourceContract, + TagResourceListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a TagResource. */ export interface TagResource { - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists a collection of resources associated with tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts index 21cdd2908a90..90af15cc9d2f 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts @@ -8,138 +8,138 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - AccessInformationContract, - TenantAccessListByServiceOptionalParams, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse -} from "../models"; + AccessIdName, + AccessInformationContract, + AccessInformationCreateParameters, + AccessInformationUpdateParameters, + TenantAccessCreateOptionalParams, + TenantAccessCreateResponse, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetEntityTagResponse, + TenantAccessGetOptionalParams, + TenantAccessGetResponse, + TenantAccessListByServiceOptionalParams, + TenantAccessListSecretsOptionalParams, + TenantAccessListSecretsResponse, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessUpdateResponse +} from "../models/index.js"; /// /** Interface representing a TenantAccess. */ export interface TenantAccess { - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams - ): Promise; - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams - ): Promise; - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams - ): Promise; - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams - ): Promise; + /** + * Returns list of access infos - for Git and Management endpoints. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Tenant access metadata + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams + ): Promise; + /** + * Get tenant access information details without secrets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams + ): Promise; + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams + ): Promise; + /** + * Update tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Parameters supplied to retrieve the Tenant Access Information. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams + ): Promise; + /** + * Regenerate primary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerate secondary access key + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams + ): Promise; + /** + * Get tenant access information details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts index 12b13c1b73e1..29e4b2f6cdeb 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts @@ -7,37 +7,37 @@ */ import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams -} from "../models"; + AccessIdName, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, + TenantAccessGitRegenerateSecondaryKeyOptionalParams +} from "../models/index.js"; /** Interface representing a TenantAccessGit. */ export interface TenantAccessGit { - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams - ): Promise; - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams - ): Promise; + /** + * Regenerate primary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regeneratePrimaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams + ): Promise; + /** + * Regenerate secondary access key for GIT. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param accessName The identifier of the Access configuration. + * @param options The options parameters. + */ + regenerateSecondaryKey( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts index 81a7460fa896..7efe4699fc17 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts @@ -6,146 +6,146 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse -} from "../models"; + ConfigurationIdName, + DeployConfigurationParameters, + SaveConfigurationParameter, + TenantConfigurationDeployOptionalParams, + TenantConfigurationDeployResponse, + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationGetSyncStateResponse, + TenantConfigurationSaveOptionalParams, + TenantConfigurationSaveResponse, + TenantConfigurationValidateOptionalParams, + TenantConfigurationValidateResponse +} from "../models/index.js"; /** Interface representing a TenantConfiguration. */ export interface TenantConfiguration { - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - >; - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams - ): Promise; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - >; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams - ): Promise; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - >; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams - ): Promise; - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams - ): Promise; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + beginDeploy( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationDeployResponse + > + >; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is + * a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Deploy Configuration parameters. + * @param options The options parameters. + */ + beginDeployAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams + ): Promise; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + beginSave( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationSaveResponse + > + >; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in + * the repository. This is a long running operation and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Save Configuration parameters. + * @param options The options parameters. + */ + beginSaveAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams + ): Promise; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + beginValidate( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TenantConfigurationValidateResponse + > + >; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation + * and could take several minutes to complete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param parameters Validate Configuration parameters. + * @param options The options parameters. + */ + beginValidateAndWait( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams + ): Promise; + /** + * Gets the status of the most recent synchronization between the configuration database and the Git + * repository. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param configurationName The identifier of the Git Configuration Operation. + * @param options The options parameters. + */ + getSyncState( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts index 4f8c4c6faa9f..036e6ac0bdab 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts @@ -8,38 +8,38 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - TenantSettingsContract, - TenantSettingsListByServiceOptionalParams, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse -} from "../models"; + SettingsTypeName, + TenantSettingsContract, + TenantSettingsGetOptionalParams, + TenantSettingsGetResponse, + TenantSettingsListByServiceOptionalParams +} from "../models/index.js"; /// /** Interface representing a TenantSettings. */ export interface TenantSettings { - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams - ): Promise; + /** + * Public settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get tenant settings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param settingsType The identifier of the settings. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts index 0b6102704805..3018b4caa931 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts @@ -8,142 +8,142 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserContract, - UserListByServiceOptionalParams, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse -} from "../models"; + UserContract, + UserCreateOrUpdateOptionalParams, + UserCreateOrUpdateResponse, + UserCreateParameters, + UserDeleteOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserGenerateSsoUrlResponse, + UserGetEntityTagOptionalParams, + UserGetEntityTagResponse, + UserGetOptionalParams, + UserGetResponse, + UserGetSharedAccessTokenOptionalParams, + UserGetSharedAccessTokenResponse, + UserListByServiceOptionalParams, + UserTokenParameters, + UserUpdateOptionalParams, + UserUpdateParameters, + UserUpdateResponse +} from "../models/index.js"; /// /** Interface representing a User. */ export interface User { - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams - ): Promise; - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams - ): Promise; - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams - ): Promise; - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams - ): Promise; - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams - ): Promise; - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams - ): Promise; + /** + * Lists a collection of registered users in the specified service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param options The options parameters. + */ + listByService( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the entity state (Etag) version of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + getEntityTag( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams + ): Promise; + /** + * Gets the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams + ): Promise; + /** + * Creates or Updates a user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create or update parameters. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates the details of the user specified by its identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param parameters Update parameters. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams + ): Promise; + /** + * Deletes specific user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header + * response of the GET request or it should be * for unconditional update. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams + ): Promise; + /** + * Retrieves a redirection URL containing an authentication token for signing a given user into the + * developer portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + generateSsoUrl( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams + ): Promise; + /** + * Gets the Shared Access Authorization Token for the User. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param parameters Create Authorization Token parameters. + * @param options The options parameters. + */ + getSharedAccessToken( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts index 0479110f882e..7a08f8198eef 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts @@ -6,21 +6,21 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { UserConfirmationPasswordSendOptionalParams } from "../models"; +import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; /** Interface representing a UserConfirmationPassword. */ export interface UserConfirmationPassword { - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams - ): Promise; + /** + * Sends confirmation + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + send( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts index a2fbd8f792de..bdeeb9743eba 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts @@ -7,22 +7,22 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { GroupContract, UserGroupListOptionalParams } from "../models"; +import { GroupContract, UserGroupListOptionalParams } from "../models/index.js"; /// /** Interface representing a UserGroup. */ export interface UserGroup { - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams - ): PagedAsyncIterableIterator; + /** + * Lists all user groups. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts index 1a242a6c686d..6de6c6ce174b 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts @@ -8,24 +8,24 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - UserIdentityContract, - UserIdentitiesListOptionalParams -} from "../models"; + UserIdentitiesListOptionalParams, + UserIdentityContract +} from "../models/index.js"; /// /** Interface representing a UserIdentities. */ export interface UserIdentities { - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams - ): PagedAsyncIterableIterator; + /** + * List of all user identities. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts index 548a266d86dd..4e1b8d8eeacc 100644 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts +++ b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts @@ -8,42 +8,42 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - SubscriptionContract, - UserSubscriptionListOptionalParams, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse -} from "../models"; + SubscriptionContract, + UserSubscriptionGetOptionalParams, + UserSubscriptionGetResponse, + UserSubscriptionListOptionalParams +} from "../models/index.js"; /// /** Interface representing a UserSubscription. */ export interface UserSubscription { - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams - ): Promise; + /** + * Lists the collection of subscriptions of the specified user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified Subscription entity associated with a particular user. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceName The name of the API Management service. + * @param userId User identifier. Must be unique in the current API Management service instance. + * @param sid Subscription entity Identifier. The entity represents the association between a user and + * a product in API Management. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams + ): Promise; } diff --git a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts b/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts index 269a2b9814b5..1c31970c4f29 100644 --- a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts +++ b/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts @@ -7,7 +7,7 @@ */ export interface PageInfo { - continuationToken?: string; + continuationToken?: string; } const pageMap = new WeakMap(); @@ -20,20 +20,20 @@ const pageMap = new WeakMap(); * @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; + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; } export function setContinuationToken( - page: unknown, - continuationToken: string | undefined + 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); + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); } diff --git a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts similarity index 56% rename from sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts rename to sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts index 67abcbe11fb7..cddda8564c8f 100644 --- a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.ts +++ b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts @@ -6,17 +6,16 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { createTestCredential } from "@azure-tools/test-credential"; import { + delay, env, + isPlaybackMode, Recorder, RecorderStartOptions, - delay, - isPlaybackMode, } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { ApiManagementClient } from "../src/apiManagementClient"; +import { ApiManagementClient } from "../src/apiManagementClient.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888", @@ -41,46 +40,50 @@ describe("Apimanagement test", () => { let resourceGroupName: string; let serviceName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; + subscriptionId = env.SUBSCRIPTION_ID || ""; // This is an example of how the environment variables are used const credential = createTestCredential(); - client = new ApiManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); + client = new ApiManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); location = "eastus"; resourceGroupName = "myjstest"; serviceName = "myserviceyyy1"; }); - afterEach(async function () { + afterEach(async () => { await recorder.stop(); }); - function sleep(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)) - } - - it("apiManagementService create test", async function () { - const res = await client.apiManagementService.beginCreateOrUpdateAndWait(resourceGroupName, serviceName, { - location: location, - sku: { - name: "Standard", - capacity: 1 + it("apiManagementService create test", { timeout: 3600000 }, async () => { + const res = await client.apiManagementService.beginCreateOrUpdateAndWait( + resourceGroupName, + serviceName, + { + location: location, + sku: { + name: "Standard", + capacity: 1, + }, + publisherEmail: "foo@contoso.com", + publisherName: "foo", }, - publisherEmail: "foo@contoso.com", - publisherName: "foo" - }, testPollingOptions); + testPollingOptions, + ); assert.equal(res.name, serviceName); - }).timeout(3600000); + }); - it("apiManagementService get test", async function () { + it("apiManagementService get test", async () => { const res = await client.apiManagementService.get(resourceGroupName, serviceName); assert.equal(res.name, serviceName); }); - it("apiManagementService listByResourceGroup test", async function () { + it("apiManagementService listByResourceGroup test", async () => { const resArray = new Array(); for await (let item of client.apiManagementService.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -88,90 +91,59 @@ describe("Apimanagement test", () => { assert.equal(resArray.length, 1); }); - it("apiManagementService update test", async function () { - // this.timeout(3600000); + it("apiManagementService update test", { timeout: 3600000 }, async () => { let count = 0; while (count < 20) { count++; const res = await client.apiManagementService.get(resourceGroupName, serviceName); if (res.provisioningState == "Succeeded") { - const res = await client.apiManagementService.beginUpdateAndWait(resourceGroupName, serviceName, { - customProperties: { - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false" - } - }, testPollingOptions); + const res = await client.apiManagementService.beginUpdateAndWait( + resourceGroupName, + serviceName, + { + customProperties: { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + }, + }, + testPollingOptions, + ); assert.equal(res.type, "Microsoft.ApiManagement/service"); break; } else { // The resource is activating - await delay(isPlaybackMode() ? 1000 : 300000) + await delay(isPlaybackMode() ? 1000 : 300000); } } - }).timeout(3600000); - + }); - it("backend create test1", async function () { - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend1", - { - description: "Service Fabric Test App 1", - url: "https://backendname26441", - protocol: "http" - }, - ); - }) + it("backend create test1", async () => {}); - it("backend create test2", async function () { - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend2", - { - description: "Service Fabric Test App 1", - url: "https://backendname26442", - protocol: "http" - }, - ); - }) + it("backend create test2", async () => {}); - it("backend list test", async function () { + it("backend list test", async () => { const resArray = new Array(); - for await (let item of client.backend.listByService(resourceGroupName, serviceName, { top: 1 })) { + for await (let item of client.backend.listByService(resourceGroupName, serviceName, { + top: 1, + })) { resArray.push(item); } assert.equal(resArray.length, 2); - }) + }); - it("backend delete test", async function () { - const res1 = await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend1", - "*" - ); - const res2 = await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend2", - "*" - ); + it("backend delete test", async () => { const resArray = new Array(); for await (let item of client.backend.listByService(resourceGroupName, serviceName)) { resArray.push(item); } assert.equal(resArray.length, 0); - }) + }); - it("apiManagementService delete test", async function () { + it("apiManagementService delete test", { timeout: 3600000 }, async () => { let count = 0; while (count < 20) { count++; const res = await client.apiManagementService.get(resourceGroupName, serviceName); if (res.provisioningState == "Succeeded") { - const res = await client.apiManagementService.beginDeleteAndWait(resourceGroupName, serviceName, testPollingOptions); - const purge_resource = await client.deletedServices.beginPurgeAndWait(serviceName, location, testPollingOptions); const resArray = new Array(); for await (let item of client.apiManagementService.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -183,5 +155,5 @@ describe("Apimanagement test", () => { await delay(isPlaybackMode() ? 1000 : 300000); } } - }).timeout(3600000); + }); }); diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.json b/sdk/apimanagement/arm-apimanagement/tsconfig.json index f92121c033f6..19ceb382b521 100644 --- a/sdk/apimanagement/arm-apimanagement/tsconfig.json +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.json @@ -1,33 +1,13 @@ { - "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, - "paths": { - "@azure/arm-apimanagement": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json b/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json new file mode 100644 index 000000000000..9ad07351dbc4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-apimanagement": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.src.json b/sdk/apimanagement/arm-apimanagement/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.test.json b/sdk/apimanagement/arm-apimanagement/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/apimanagement/arm-apimanagement/vitest.config.ts b/sdk/apimanagement/arm-apimanagement/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts b/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +);